1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

Fix rtl tests

* module/system/vm/assembler.scm (write-arities): Add a diagnostic.

* test-suite/tests/rtl.test: Fix tests to emit "definition"
  instructions.
This commit is contained in:
Andy Wingo 2014-04-15 22:00:30 +02:00
parent c271065e54
commit 4cbe4d72aa
2 changed files with 17 additions and 2 deletions

View file

@ -1481,6 +1481,8 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If
(define (write-arities asm metas headers names-port strtab)
(define (write-header pos low-pc high-pc offset flags nreq nopt nlocals)
(unless (<= (+ nreq nopt) nlocals)
(error "forgot to emit definition instructions?"))
(bytevector-u32-set! headers pos (* low-pc 4) (asm-endianness asm))
(bytevector-u32-set! headers (+ pos 4) (* high-pc 4) (asm-endianness asm))
(bytevector-u32-set! headers (+ pos 8) offset (asm-endianness asm))