compiler.cfg.build-stack-frame.tests: improved fix for the test case
parent
4306180c11
commit
9b7a873f6d
|
@ -1,44 +1,25 @@
|
||||||
USING: accessors combinators.short-circuit compiler.cfg
|
USING: accessors compiler.cfg compiler.cfg.build-stack-frame
|
||||||
compiler.cfg.build-stack-frame compiler.cfg.instructions
|
compiler.cfg.instructions compiler.cfg.stack-frame cpu.x86 kernel layouts
|
||||||
compiler.cfg.stack-frame kernel layouts slots.syntax system
|
math slots.syntax system tools.test ;
|
||||||
tools.test ;
|
|
||||||
IN: compiler.cfg.build-stack-frame.tests
|
IN: compiler.cfg.build-stack-frame.tests
|
||||||
|
|
||||||
{ [ os windows? ] [ cell-bits 64 = ] } 0&& [
|
{
|
||||||
{
|
! 91 8 align
|
||||||
! 91 8 align
|
96
|
||||||
96
|
! 91 8 align 16 +
|
||||||
! 91 8 align 16 +
|
112
|
||||||
112
|
! 91 8 align 16 + 16 8 align + cell + 16 align
|
||||||
! XXX: Calculation is wrong for Windows 64 (off by 32 bytes)
|
144
|
||||||
! 91 8 align 16 + 16 8 align + cell + 16 align
|
} [
|
||||||
176
|
T{ stack-frame
|
||||||
} [
|
{ params 91 }
|
||||||
T{ stack-frame
|
{ allot-area-align 8 }
|
||||||
{ params 91 }
|
{ allot-area-size 10 }
|
||||||
{ allot-area-align 8 }
|
{ spill-area-align 8 }
|
||||||
{ allot-area-size 10 }
|
{ spill-area-size 16 }
|
||||||
{ spill-area-align 8 }
|
} dup finalize-stack-frame
|
||||||
{ spill-area-size 16 }
|
slots[ allot-area-base spill-area-base total-size ]
|
||||||
} dup finalize-stack-frame
|
! Exclude any reserved stack space 32 bytes on win64, 0 bytes
|
||||||
slots[ allot-area-base spill-area-base total-size ]
|
! on all other platforms.
|
||||||
] unit-test
|
reserved-stack-space -
|
||||||
] [
|
] unit-test
|
||||||
{
|
|
||||||
! 91 8 align
|
|
||||||
96
|
|
||||||
! 91 8 align 16 +
|
|
||||||
112
|
|
||||||
! 91 8 align 16 + 16 8 align + cell + 16 align
|
|
||||||
144
|
|
||||||
} [
|
|
||||||
T{ stack-frame
|
|
||||||
{ params 91 }
|
|
||||||
{ allot-area-align 8 }
|
|
||||||
{ allot-area-size 10 }
|
|
||||||
{ spill-area-align 8 }
|
|
||||||
{ spill-area-size 16 }
|
|
||||||
} dup finalize-stack-frame
|
|
||||||
slots[ allot-area-base spill-area-base total-size ]
|
|
||||||
] unit-test
|
|
||||||
] if
|
|
||||||
|
|
Loading…
Reference in New Issue