]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/build-stack-frame/build-stack-frame-tests.factor
c60a44ab53e8493a6b0c82b8b22d55b6a2a0bafb
[factor.git] / basis / compiler / cfg / build-stack-frame / build-stack-frame-tests.factor
1 USING: compiler.cfg.build-stack-frame compiler.cfg.stack-frame
2 cpu.x86 math slots.syntax tools.test ;
3 IN: compiler.cfg.build-stack-frame.tests
4
5 {
6     ! 91 8 align
7     96
8     ! 91 8 align 16 +
9     112
10     ! 91 8 align 16 + 16 8 align + cell + 16 align
11     144
12 } [
13     T{ stack-frame
14        { params 91 }
15        { allot-area-align 8 }
16        { allot-area-size 10 }
17        { spill-area-align 8 }
18        { spill-area-size 16 }
19     } finalize-stack-frame
20     slots[ allot-area-base spill-area-base total-size ]
21     ! Exclude any reserved stack space 32 bytes on win64, 0 bytes
22     ! on all other platforms.
23     reserved-stack-space -
24 ] unit-test