1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

VM opcodes only have <24-bit slot operands in the first word

* libguile/vm-engine.c (make-array): Change to only have
  restricted-width operands in the first word.  This instruction is
  currently unused, however.

* module/system/vm/assembler.scm (assembler):
* module/system/vm/disassembler.scm (disassembler): Disallow
  restricted-width operands in tail words.
This commit is contained in:
Andy Wingo 2014-04-20 11:52:14 +02:00
parent d6651f6903
commit c09708f985
3 changed files with 5 additions and 29 deletions

View file

@ -398,12 +398,6 @@ later by the linker."
((U8_L24 a label)
(record-label-reference asm label)
(emit asm a))
((U8_U8_I16 a b imm)
(emit asm (pack-u8-u8-u16 a b (object-address imm))))
((U8_U12_U12 a b)
(emit asm (pack-u8-u12-u12 a b c)))
((U8_U8_U8_U8 a b c d)
(emit asm (pack-u8-u8-u8-u8 a b c d)))
((U32 a)
(emit asm a))
((I32 imm)
@ -432,8 +426,6 @@ later by the linker."
(emit asm 0))
((X8_U24 a)
(emit asm (pack-u8-u24 0 a)))
((X8_U12_U12 a b)
(emit asm (pack-u8-u12-u12 0 a b)))
((X8_L24 label)
(record-label-reference asm label)
(emit asm 0))

View file

@ -110,19 +110,6 @@
((U8_L24)
#'((logand word #xff)
(unpack-s24 (ash word -8))))
((U8_U8_I16)
#'((logand word #xff)
(logand (ash word -8) #xff)
(ash word -16)))
((U8_U12_U12)
#'((logand word #xff)
(logand (ash word -8) #xfff)
(ash word -20)))
((U8_U8_U8_U8)
#'((logand word #xff)
(logand (ash word -8) #xff)
(logand (ash word -16) #xff)
(ash word -24)))
((U32)
#'(word))
((I32)
@ -141,9 +128,6 @@
#'((unpack-s32 word)))
((X8_U24)
#'((ash word -8)))
((X8_U12_U12)
#'((logand (ash word -8) #xfff)
(ash word -20)))
((X8_L24)
#'((unpack-s24 (ash word -8))))
((B1_X7_L24)