cpu.architecture.tests: fix tests for win 64
parent
9b7a873f6d
commit
8ea234e4de
|
@ -1,19 +1,19 @@
|
||||||
USING: compiler.cfg.instructions compiler.cfg.stack-frame kernel namespaces
|
USING: accessors compiler.cfg.instructions compiler.cfg.stack-frame
|
||||||
system tools.test ;
|
cpu.architecture cpu.x86 kernel layouts math namespaces system tools.test ;
|
||||||
IN: cpu.architecture
|
IN: cpu.architecture.tests
|
||||||
|
|
||||||
|
: expected-gc-root-offset ( slot-number spill-area-base -- offset )
|
||||||
|
[ spill-slot boa ] [ stack-frame new swap >>spill-area-base ] bi*
|
||||||
|
stack-frame [
|
||||||
|
gc-root-offset reserved-stack-space cell / -
|
||||||
|
] with-variable ;
|
||||||
|
|
||||||
cpu x86.64? [
|
cpu x86.64? [
|
||||||
! The offset is 1, not 0 because the return address occupies the
|
! The offset is 1, not 0 because the return address occupies the
|
||||||
! first position in the stack frame.
|
! first position in the stack frame.
|
||||||
{ 1 } [
|
{ 1 } [ 0 0 expected-gc-root-offset ] unit-test
|
||||||
T{ stack-frame { spill-area-base 0 } } stack-frame [
|
|
||||||
T{ spill-slot { n 0 } } gc-root-offset
|
|
||||||
] with-variable
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
{ 10 } [
|
{ 10 } [ 8 64 expected-gc-root-offset ] unit-test
|
||||||
T{ stack-frame { spill-area-base 64 } } stack-frame [
|
|
||||||
T{ spill-slot { n 8 } } gc-root-offset
|
{ 20 } [ 24 128 expected-gc-root-offset ] unit-test
|
||||||
] with-variable
|
|
||||||
] unit-test
|
|
||||||
] when
|
] when
|
||||||
|
|
Loading…
Reference in New Issue