Docs: docs for compiler-related vocabs
parent
ea48d13731
commit
4f9f2b862f
|
@ -29,7 +29,7 @@ HELP: ##alien-invoke
|
||||||
|
|
||||||
HELP: ##set-slot
|
HELP: ##set-slot
|
||||||
{ $class-description
|
{ $class-description
|
||||||
"An instruction for non-primitive non-immediate variant of " { $link set-slot } ". It has the following slots:"
|
"An instruction for the non-primitive, non-immediate variant of " { $link set-slot } ". It has the following slots:"
|
||||||
{ $table
|
{ $table
|
||||||
{ { $slot "src" } { "Object to put in the slot." } }
|
{ { $slot "src" } { "Object to put in the slot." } }
|
||||||
{ { $slot "obj" } { "Object to set the slot on." } }
|
{ { $slot "obj" } { "Object to set the slot on." } }
|
||||||
|
@ -63,3 +63,12 @@ HELP: ##peek
|
||||||
"Copies a value from a stack location to a machine register."
|
"Copies a value from a stack location to a machine register."
|
||||||
}
|
}
|
||||||
{ $see-also ##replace } ;
|
{ $see-also ##replace } ;
|
||||||
|
|
||||||
|
HELP: ##safepoint
|
||||||
|
{ $class-description "Instruction that inserts a safe point in the generated code." } ;
|
||||||
|
|
||||||
|
HELP: ##return
|
||||||
|
{ $class-description "Instruction that returns from a procedure call." } ;
|
||||||
|
|
||||||
|
HELP: ##no-tco
|
||||||
|
{ $class-description "A dummy instruction that simply inhibits TCO." } ;
|
||||||
|
|
|
@ -85,7 +85,6 @@ INSN: ##return ;
|
||||||
|
|
||||||
INSN: ##safepoint ;
|
INSN: ##safepoint ;
|
||||||
|
|
||||||
! Dummy instruction that simply inhibits TCO
|
|
||||||
INSN: ##no-tco ;
|
INSN: ##no-tco ;
|
||||||
|
|
||||||
! Jump tables
|
! Jump tables
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: assocs cpu.x86.assembler help.markup help.syntax math system ;
|
USING: assocs cpu.x86.assembler help.markup help.syntax math system words ;
|
||||||
IN: cpu.architecture
|
IN: cpu.architecture
|
||||||
|
|
||||||
HELP: immediate-arithmetic?
|
HELP: immediate-arithmetic?
|
||||||
|
@ -17,10 +17,22 @@ HELP: vm-stack-space
|
||||||
HELP: complex-addressing?
|
HELP: complex-addressing?
|
||||||
{ $description "Specifies if " { $link %slot } ", " { $link %set-slot } " and " { $link %write-barrier } " accept the 'scale' and 'tag' parameters, and if %load-memory and %store-memory work." } ;
|
{ $description "Specifies if " { $link %slot } ", " { $link %set-slot } " and " { $link %write-barrier } " accept the 'scale' and 'tag' parameters, and if %load-memory and %store-memory work." } ;
|
||||||
|
|
||||||
|
HELP: param-regs
|
||||||
|
{ $values { "abi" "a calling convention symbol" } { "regs" assoc } }
|
||||||
|
{ $description "Retrieves the order in which machine registers are used for parameters for the given calling convention." } ;
|
||||||
|
|
||||||
HELP: %load-immediate
|
HELP: %load-immediate
|
||||||
{ $values { "reg" "a register symbol" } { "val" "a value" } }
|
{ $values { "reg" "a register symbol" } { "val" "a value" } }
|
||||||
{ $description "Emits code for loading an immediate value into a register. On " { $link x86 } ", if val is 0, then an " { $link XOR } " instruction is emitted instead of " { $link MOV } "." } ;
|
{ $description "Emits code for loading an immediate value into a register. On " { $link x86 } ", if val is 0, then an " { $link XOR } " instruction is emitted instead of " { $link MOV } "." } ;
|
||||||
|
|
||||||
HELP: param-regs
|
HELP: %call
|
||||||
{ $values { "abi" "a calling convention symbol" } { "regs" assoc } }
|
{ $values { "word" word } }
|
||||||
{ $description "Retrieves the order in which machine registers are used for parameters for the given calling convention." } ;
|
{ $description "Emits code for calling a word in Factor." } ;
|
||||||
|
|
||||||
|
HELP: fused-unboxing?
|
||||||
|
{ $values { "?" "a boolean" } }
|
||||||
|
{ $description "Whether this architecture support " { $link %load-float } ", " { $link %load-double } ", and " { $link %load-vector } "." } ;
|
||||||
|
|
||||||
|
HELP: return-regs
|
||||||
|
{ $values { "regs" assoc } }
|
||||||
|
{ $description "What registers that will be used for function return values of which class." } ;
|
||||||
|
|
|
@ -519,8 +519,6 @@ HOOK: %reload cpu ( dst rep src -- )
|
||||||
|
|
||||||
HOOK: %loop-entry cpu ( -- )
|
HOOK: %loop-entry cpu ( -- )
|
||||||
|
|
||||||
! Does this architecture support %load-float, %load-double,
|
|
||||||
! and %load-vector?
|
|
||||||
HOOK: fused-unboxing? cpu ( -- ? )
|
HOOK: fused-unboxing? cpu ( -- ? )
|
||||||
|
|
||||||
HOOK: immediate-arithmetic? cpu ( n -- ? )
|
HOOK: immediate-arithmetic? cpu ( n -- ? )
|
||||||
|
@ -548,7 +546,6 @@ M: object immediate-comparand? ( n -- ? )
|
||||||
|
|
||||||
! FFI stuff
|
! FFI stuff
|
||||||
|
|
||||||
! Return values of this class go here
|
|
||||||
HOOK: return-regs cpu ( -- regs )
|
HOOK: return-regs cpu ( -- regs )
|
||||||
|
|
||||||
! Registers used for parameter passing
|
! Registers used for parameter passing
|
||||||
|
|
|
@ -82,7 +82,7 @@ HELP: modify-code-heap
|
||||||
{ $values { "alist" "an association list with words as keys" } { "update-existing?" "a boolean" } { "reset-pics?" "a boolean" } }
|
{ $values { "alist" "an association list with words as keys" } { "update-existing?" "a boolean" } { "reset-pics?" "a boolean" } }
|
||||||
{ $description "Lowest-level primitive for defining words. Associates words with code blocks in the code heap."
|
{ $description "Lowest-level primitive for defining words. Associates words with code blocks in the code heap."
|
||||||
$nl
|
$nl
|
||||||
"The alist maps words to the following:"
|
"The alist maps words to one of the following:"
|
||||||
{ $list
|
{ $list
|
||||||
{ "a quotation - in this case, the quotation is compiled with the non-optimizing compiler and the word will call the quotation when executed." }
|
{ "a quotation - in this case, the quotation is compiled with the non-optimizing compiler and the word will call the quotation when executed." }
|
||||||
{ "a 5-element array " { $snippet "{ parameters literals relocation labels code }" } " - in this case, a code heap block is allocated with the given data and the word will call the code block when executed. This is used by the optimizing compiler." }
|
{ "a 5-element array " { $snippet "{ parameters literals relocation labels code }" } " - in this case, a code heap block is allocated with the given data and the word will call the code block when executed. This is used by the optimizing compiler." }
|
||||||
|
|
Loading…
Reference in New Issue