1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Fix prim -> VM op mapping for u8/s8 bytevector ops

* module/language/cps/primitives.scm (*instruction-aliases*): Fix
  aliases for bytevector u8 / s8 operations.

* module/language/cps/compile-bytecode.scm (compile-fun): Fix s8
  operations.
This commit is contained in:
Andy Wingo 2013-12-07 19:41:59 +01:00
parent 1df515a077
commit d59060ce99
2 changed files with 8 additions and 4 deletions

View file

@ -299,6 +299,8 @@
(emit-builtin-ref asm dst (constant name)))
(($ $primcall 'bv-u8-ref (bv idx))
(emit-bv-u8-ref asm dst (slot bv) (slot idx)))
(($ $primcall 'bv-s8-ref (bv idx))
(emit-bv-s8-ref asm dst (slot bv) (slot idx)))
(($ $primcall 'bv-u16-ref (bv idx))
(emit-bv-u16-ref asm dst (slot bv) (slot idx)))
(($ $primcall 'bv-s16-ref (bv idx))
@ -372,6 +374,8 @@
(emit-wind asm (slot winder) (slot unwinder)))
(($ $primcall 'bv-u8-set! (bv idx val))
(emit-bv-u8-set! asm (slot bv) (slot idx) (slot val)))
(($ $primcall 'bv-s8-set! (bv idx val))
(emit-bv-s8-set! asm (slot bv) (slot idx) (slot val)))
(($ $primcall 'bv-u16-set! (bv idx val))
(emit-bv-u16-set! asm (slot bv) (slot idx) (slot val)))
(($ $primcall 'bv-s16-set! (bv idx val))

View file

@ -40,21 +40,21 @@
(modulo . mod)
(variable-ref . box-ref)
(variable-set! . box-set!)
(bytevector-u8-native-ref . bv-u8-ref)
(bytevector-u8-ref . bv-u8-ref)
(bytevector-u16-native-ref . bv-u16-ref)
(bytevector-u32-native-ref . bv-u32-ref)
(bytevector-u64-native-ref . bv-u64-ref)
(bytevector-s8-native-ref . bv-s8-ref)
(bytevector-s8-ref . bv-s8-ref)
(bytevector-s16-native-ref . bv-s16-ref)
(bytevector-s32-native-ref . bv-s32-ref)
(bytevector-s64-native-ref . bv-s64-ref)
(bytevector-f32-native-ref . bv-f32-ref)
(bytevector-f64-native-ref . bv-f64-ref)
(bytevector-u8-native-set! . bv-u8-set!)
(bytevector-u8-set! . bv-u8-set!)
(bytevector-u16-native-set! . bv-u16-set!)
(bytevector-u32-native-set! . bv-u32-set!)
(bytevector-u64-native-set! . bv-u64-set!)
(bytevector-s8-native-set! . bv-s8-set!)
(bytevector-s8-set! . bv-s8-set!)
(bytevector-s16-native-set! . bv-s16-set!)
(bytevector-s32-native-set! . bv-s32-set!)
(bytevector-s64-native-set! . bv-s64-set!)