UNUSED: Fix returning in cells instead of address units

This commit is contained in:
Remko Tronçon 2022-06-03 21:20:20 +02:00
parent 322c22f0f7
commit fb25416734
2 changed files with 9 additions and 9 deletions

View file

@ -1923,7 +1923,7 @@
;; [6.2.2395](https://forth-standard.org/standard/core/UNUSED)
(func $UNUSED (param $tos i32) (result i32)
(local.get $tos)
(call $push (i32.shr_s (i32.sub (i32.const 0x6400000 (; = MEMORY_SIZE ;)) (global.get $here)) (i32.const 2))))
(call $push (i32.sub (i32.const 0x6400000 (; = MEMORY_SIZE ;)) (global.get $here))))
(data (i32.const 0x20970) "\60\09\02\00" "\06" "UNUSED " "\aa\00\00\00")
(elem (i32.const 0xaa) $UNUSED)

View file

@ -304,15 +304,15 @@ T{ MAX-INT MAX-INT 0 WITHIN -> TRUE }T
T{ MAX-INT MAX-INT 1 WITHIN -> TRUE }T
T{ MAX-INT MAX-INT MAX-INT WITHIN -> FALSE }T
\ \ -----------------------------------------------------------------------------
\ TESTING UNUSED (contributed by James Bowman & Peter Knaggs)
\ -----------------------------------------------------------------------------
TESTING UNUSED (contributed by James Bowman & Peter Knaggs)
\ VARIABLE UNUSED0
\ T{ UNUSED DROP -> }T
\ T{ ALIGN UNUSED UNUSED0 ! 0 , UNUSED CELL+ UNUSED0 @ = -> TRUE }T
\ T{ UNUSED UNUSED0 ! 0 C, UNUSED CHAR+ UNUSED0 @ =
\ -> TRUE }T \ aligned -> unaligned
\ T{ UNUSED UNUSED0 ! 0 C, UNUSED CHAR+ UNUSED0 @ = -> TRUE }T \ unaligned -> ?
VARIABLE UNUSED0
T{ UNUSED DROP -> }T
T{ ALIGN UNUSED UNUSED0 ! 0 , UNUSED CELL+ UNUSED0 @ = -> TRUE }T
T{ UNUSED UNUSED0 ! 0 C, UNUSED CHAR+ UNUSED0 @ =
-> TRUE }T \ aligned -> unaligned
T{ UNUSED UNUSED0 ! 0 C, UNUSED CHAR+ UNUSED0 @ = -> TRUE }T \ unaligned -> ?
\ \ -----------------------------------------------------------------------------
\ TESTING AGAIN (contributed by James Bowman)