compiler,cpu: more docs
parent
476ebf5b25
commit
83cf4b9d57
|
@ -0,0 +1,17 @@
|
|||
USING: cpu.architecture help.markup help.syntax math ;
|
||||
IN: compiler.cfg.builder.alien.params
|
||||
|
||||
HELP: stack-params
|
||||
{ $var-description "Count of the number of bytes of stack allocation required to store the current call frames parameters." } ;
|
||||
|
||||
HELP: alloc-stack-param
|
||||
{ $values { "rep" representation } { "n" integer } }
|
||||
{ $description "Allocates space for a stack parameter value of the given representation and returns the previous stack parameter offset." }
|
||||
{ $examples
|
||||
"On 32-bit architectures, the offsets will be aligned to four byte boundaries."
|
||||
{ $unchecked-example
|
||||
"0 stack-params set float-rep alloc-stack-param stack-params get . ."
|
||||
"4"
|
||||
"0"
|
||||
}
|
||||
} ;
|
|
@ -1,4 +1,4 @@
|
|||
USING: assocs compiler.cfg.instructions cpu.x86.assembler
|
||||
USING: assocs alien compiler.cfg.instructions cpu.x86.assembler
|
||||
cpu.x86.assembler.operands help.markup help.syntax kernel
|
||||
layouts literals math multiline system words ;
|
||||
IN: cpu.architecture
|
||||
|
@ -134,3 +134,30 @@ HELP: fused-unboxing?
|
|||
HELP: return-regs
|
||||
{ $values { "regs" assoc } }
|
||||
{ $description "What registers that will be used for function return values of which class." } ;
|
||||
|
||||
HELP: stack-cleanup
|
||||
{ $values { "stack-size" integer } { "return" "a c type" } { "abi" abi } }
|
||||
{ $description "Calculates how many bytes of stack space the caller of the procedure being constructed need to cleanup. For modern abi's the value is almost always 0." }
|
||||
{ $examples
|
||||
{ $unchecked-example
|
||||
"USING: cpu.architecture prettyprint ;"
|
||||
"20 void stdcall stack-cleanup ."
|
||||
"20"
|
||||
}
|
||||
} ;
|
||||
|
||||
ARTICLE: "cpu.architecture" "CPU architecture description model"
|
||||
"The " { $vocab-link "cpu.architecture" } " vocab generic words and hooks that serves as an api for the compiler towards the cpu architecture."
|
||||
$nl
|
||||
"Register categories:"
|
||||
{ $subsections machine-registers param-regs return-regs }
|
||||
"Architecture support checks:"
|
||||
{ $subsections
|
||||
complex-addressing?
|
||||
float-on-stack?
|
||||
float-right-align-on-stack?
|
||||
fused-unboxing?
|
||||
test-instruction?
|
||||
}
|
||||
"Control flow code emitters:"
|
||||
{ $subsections %call %jump %jump-label %return } ;
|
||||
|
|
|
@ -7,6 +7,10 @@ HELP: stack-reg
|
|||
"Symbol of the machine register that holds the (cpu) stack address."
|
||||
} ;
|
||||
|
||||
HELP: reserved-stack-space
|
||||
{ $values { "n" integer } }
|
||||
{ $description "Size in bytes of the register parameter area. It only exists on the windows x86.64 architecture, where it is 32 bytes and allocated by the caller. On all other platforms it is 0." } ;
|
||||
|
||||
HELP: ds-reg
|
||||
{ $values { "reg" "a register symbol" } }
|
||||
{ $description
|
||||
|
|
Loading…
Reference in New Issue