diff --git a/basis/compiler/cfg/build-stack-frame/build-stack-frame-docs.factor b/basis/compiler/cfg/build-stack-frame/build-stack-frame-docs.factor index 77b84ab6ad..36036a1f63 100644 --- a/basis/compiler/cfg/build-stack-frame/build-stack-frame-docs.factor +++ b/basis/compiler/cfg/build-stack-frame/build-stack-frame-docs.factor @@ -4,6 +4,10 @@ IN: compiler.cfg.build-stack-frame ARTICLE: "compiler.cfg.build-stack-frame" "Computing stack frame size and layout" "The " { $vocab-link "compiler.cfg.build-stack-frame" } " vocab builds stack frames for cfg:s." ; +HELP: param-area-size +{ $var-description "Temporary variable used when building stack frames to calculate the parameter area size." } +{ $see-also build-stack-frame } ; + HELP: frame-required? { $var-description "Whether the word being compiled requires a stack frame or not. Most words does, but very simple words does not." } ; diff --git a/basis/compiler/cfg/def-use/def-use-docs.factor b/basis/compiler/cfg/def-use/def-use-docs.factor index 320e0550bb..bcb7bc0dbe 100644 --- a/basis/compiler/cfg/def-use/def-use-docs.factor +++ b/basis/compiler/cfg/def-use/def-use-docs.factor @@ -36,6 +36,10 @@ HELP: uses-vregs } } ; +HELP: special-vreg-insns +{ $var-description "Instructions with unusual operands, also see these passes for special behavior:" { $list "compiler.cfg.renaming.functor" "compiler.cfg.representations.preferred" } +} ; + ARTICLE: "compiler.cfg.def-use" "Common code used by several passes for def-use analysis" "The " { $vocab-link "compiler.cfg.def-use" } " contains tools to correlate SSA instructions with virtual registers defined or used by them." $nl diff --git a/basis/compiler/cfg/def-use/def-use.factor b/basis/compiler/cfg/def-use/def-use.factor index 9f750f16dc..770dfbc46d 100644 --- a/basis/compiler/cfg/def-use/def-use.factor +++ b/basis/compiler/cfg/def-use/def-use.factor @@ -20,10 +20,6 @@ M: insn defs-vregs drop { } ; M: insn temp-vregs drop { } ; M: insn uses-vregs drop { } ; -! Instructions with unusual operands, also see these passes -! for special behavior: -! - compiler.cfg.renaming.functor -! - compiler.cfg.representations.preferred CONSTANT: special-vreg-insns { ##parallel-copy ##phi diff --git a/basis/compiler/cfg/instructions/instructions-docs.factor b/basis/compiler/cfg/instructions/instructions-docs.factor index 6e147a7d89..d263bc293c 100644 --- a/basis/compiler/cfg/instructions/instructions-docs.factor +++ b/basis/compiler/cfg/instructions/instructions-docs.factor @@ -1,6 +1,6 @@ -USING: arrays assocs classes compiler.cfg compiler.codegen.gc-maps +USING: alien arrays assocs classes compiler.cfg compiler.codegen.gc-maps cpu.architecture help.markup help.syntax kernel layouts sequences -slots.private ; +slots.private system ; IN: compiler.cfg.instructions HELP: new-insn @@ -62,7 +62,10 @@ HELP: ##alien-invoke "An instruction for calling a function in a dynamically linked library. It has the following slots:" { $table { { $slot "reg-inputs" } { "Registers to use for the arguments to the function call." } } - { { $slot "stack-inputs" } { "Stack slots used for the arguments to the function call. Only used if all register arguments are already filled." } } + { + { $slot "stack-inputs" } + { "Stack slots used for the arguments to the function call." } + } { { $slot "reg-outputs" } { "If the called function returns a value, then this slot is a one-element sequence containing a 3-tuple describing which register is used for the return value." } @@ -70,6 +73,7 @@ HELP: ##alien-invoke { { $slot "symbols" } { "Name of the function to call." } } { { $slot "dll" } { "A dll handle." } } } + "Which function arguments that goes in " { $slot "reg-inputs" } " and which goes in " { $slot "stack-inputs" } " depend on the calling convention. In " { $link cdecl } " on " { $link x86.32 } ", all arguments goes in " { $slot "stack-inputs" } " but on " { $link x86.64 } " the first six arguments are passed in registers and only then are the stack used." } ; HELP: alien-call-insn diff --git a/basis/cpu/architecture/architecture-docs.factor b/basis/cpu/architecture/architecture-docs.factor index ddf4972d1c..bcb70beea3 100644 --- a/basis/cpu/architecture/architecture-docs.factor +++ b/basis/cpu/architecture/architecture-docs.factor @@ -98,7 +98,17 @@ HELP: %load-immediate HELP: %call { $values { "word" word } } -{ $description "Emits code for calling a word in Factor." } ; +{ $description "Emits code for calling a Factor word." } ; + +HELP: %box +{ $values + { "dst" "destination register" } + { "src" "source register" } + { "func" "function?" } + { "rep" "representation class" } + { "gc-map" gc-map } +} +{ $description "Call a function to convert a value into a tagged pointer, possibly allocating a bignum, float, or alien instance, which is then pushed on the data stack." } ; HELP: %box-alien { $values { "dst" "destination register" } { "src" "source register" } { "temp" "temporary register" } }