]> gitweb.factorcode.org Git - factor.git/blob - basis/bootstrap/assembler/x86.64.unix.factor
Switch to https urls
[factor.git] / basis / bootstrap / assembler / x86.64.unix.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: cpu.x86.assembler.operands kernel layouts parser
4 sequences ;
5 IN: bootstrap.assembler.x86
6
7 : stack-frame-size ( -- n ) 4 bootstrap-cells ;
8 : nv-regs ( -- seq ) { RBX R12 R13 R14 R15 } ;
9 : volatile-regs ( -- seq ) { RAX RCX RDX RSI RDI R8 R9 R10 R11 } ;
10
11 ! The first four parameter registers according to the Unix 64bit
12 ! calling convention.
13 : arg1 ( -- reg ) RDI ;
14 : arg2 ( -- reg ) RSI ;
15 : arg3 ( -- reg ) RDX ;
16 : arg4 ( -- reg ) RCX ;
17 : red-zone-size ( -- n ) 128 ;
18
19 << "resource:basis/bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call
20 << "resource:basis/bootstrap/assembler/x86.64.factor" parse-file suffix! >> call
21 << "resource:basis/bootstrap/assembler/x86.factor" parse-file suffix! >> call