diff --git a/basis/compiler/cfg/instructions/instructions-doc.factor b/basis/compiler/cfg/instructions/instructions-doc.factor index 37b47462e3..d4c4d8e339 100644 --- a/basis/compiler/cfg/instructions/instructions-doc.factor +++ b/basis/compiler/cfg/instructions/instructions-doc.factor @@ -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." } ; diff --git a/basis/compiler/cfg/instructions/instructions.factor b/basis/compiler/cfg/instructions/instructions.factor index f73d10c960..df6dcf9af3 100644 --- a/basis/compiler/cfg/instructions/instructions.factor +++ b/basis/compiler/cfg/instructions/instructions.factor @@ -85,7 +85,6 @@ INSN: ##return ; INSN: ##safepoint ; -! Dummy instruction that simply inhibits TCO INSN: ##no-tco ; ! Jump tables diff --git a/basis/cpu/architecture/architecture-docs.factor b/basis/cpu/architecture/architecture-docs.factor index bf92698646..b0f08504b0 100644 --- a/basis/cpu/architecture/architecture-docs.factor +++ b/basis/cpu/architecture/architecture-docs.factor @@ -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." } ; diff --git a/basis/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor index dea379e86e..af55954540 100644 --- a/basis/cpu/architecture/architecture.factor +++ b/basis/cpu/architecture/architecture.factor @@ -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 diff --git a/core/compiler/units/units-docs.factor b/core/compiler/units/units-docs.factor index 8845dae7c2..93e8a468ee 100644 --- a/core/compiler/units/units-docs.factor +++ b/core/compiler/units/units-docs.factor @@ -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." }