Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.

Previous: , Up: Instruction Set   [Contents][Index] Inlined Bytevector Instructions

Bytevector operations correspond closely to what the current hardware can do, so it makes sense to inline them to VM instructions, providing a clear path for eventual native compilation. Without this, Scheme programs would need other primitives for accessing raw bytes – but these primitives are as good as any.

As in the previous section, the definitions below show stack parameters instead of instruction stream parameters.

The multibyte formats (u16, f64, etc) take an extra endianness argument. Only aligned native accesses are currently fast-pathed in Guile’s VM.

Instruction: bv-u8-ref bv n
Instruction: bv-s8-ref bv n
Instruction: bv-u16-native-ref bv n
Instruction: bv-s16-native-ref bv n
Instruction: bv-u32-native-ref bv n
Instruction: bv-s32-native-ref bv n
Instruction: bv-u64-native-ref bv n
Instruction: bv-s64-native-ref bv n
Instruction: bv-f32-native-ref bv n
Instruction: bv-f64-native-ref bv n
Instruction: bv-u16-ref bv n endianness
Instruction: bv-s16-ref bv n endianness
Instruction: bv-u32-ref bv n endianness
Instruction: bv-s32-ref bv n endianness
Instruction: bv-u64-ref bv n endianness
Instruction: bv-s64-ref bv n endianness
Instruction: bv-f32-ref bv n endianness
Instruction: bv-f64-ref bv n endianness
Instruction: bv-u8-set bv n val
Instruction: bv-s8-set bv n val
Instruction: bv-u16-native-set bv n val
Instruction: bv-s16-native-set bv n val
Instruction: bv-u32-native-set bv n val
Instruction: bv-s32-native-set bv n val
Instruction: bv-u64-native-set bv n val
Instruction: bv-s64-native-set bv n val
Instruction: bv-f32-native-set bv n val
Instruction: bv-f64-native-set bv n val
Instruction: bv-u16-set bv n val endianness
Instruction: bv-s16-set bv n val endianness
Instruction: bv-u32-set bv n val endianness
Instruction: bv-s32-set bv n val endianness
Instruction: bv-u64-set bv n val endianness
Instruction: bv-s64-set bv n val endianness
Instruction: bv-f32-set bv n val endianness
Instruction: bv-f64-set bv n val endianness

Inlined implementations of the corresponding bytevector operations.

Previous: , Up: Instruction Set   [Contents][Index]