Docs: docs for compiler-related vocabs

db4
Björn Lindqvist 2014-05-08 18:50:49 +02:00 committed by John Benediktsson
parent ea48d13731
commit 4f9f2b862f
5 changed files with 27 additions and 10 deletions

View File

@ -29,7 +29,7 @@ HELP: ##alien-invoke
HELP: ##set-slot
{ $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
{ { $slot "src" } { "Object to put in the slot." } }
{ { $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."
}
{ $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." } ;

View File

@ -85,7 +85,6 @@ INSN: ##return ;
INSN: ##safepoint ;
! Dummy instruction that simply inhibits TCO
INSN: ##no-tco ;
! Jump tables

View File

@ -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
HELP: immediate-arithmetic?
@ -17,10 +17,22 @@ HELP: vm-stack-space
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." } ;
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
{ $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 } "." } ;
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: %call
{ $values { "word" word } }
{ $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." } ;

View File

@ -519,8 +519,6 @@ HOOK: %reload cpu ( dst rep src -- )
HOOK: %loop-entry cpu ( -- )
! Does this architecture support %load-float, %load-double,
! and %load-vector?
HOOK: fused-unboxing? cpu ( -- ? )
HOOK: immediate-arithmetic? cpu ( n -- ? )
@ -548,7 +546,6 @@ M: object immediate-comparand? ( n -- ? )
! FFI stuff
! Return values of this class go here
HOOK: return-regs cpu ( -- regs )
! Registers used for parameter passing

View File

@ -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" } }
{ $description "Lowest-level primitive for defining words. Associates words with code blocks in the code heap."
$nl
"The alist maps words to the following:"
"The alist maps words to one of the following:"
{ $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 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." }