Docs: docs for cpu.* vocabs
parent
0bb3e2397b
commit
6626cd24a1
|
@ -1,4 +1,4 @@
|
||||||
USING: help.markup help.syntax math ;
|
USING: assocs cpu.x86.assembler help.markup help.syntax math system ;
|
||||||
IN: cpu.architecture
|
IN: cpu.architecture
|
||||||
|
|
||||||
HELP: immediate-arithmetic?
|
HELP: immediate-arithmetic?
|
||||||
|
@ -16,3 +16,11 @@ 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: %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." } ;
|
||||||
|
|
|
@ -13,7 +13,7 @@ HELP: ds-reg
|
||||||
|
|
||||||
HELP: (%inc)
|
HELP: (%inc)
|
||||||
{ $description
|
{ $description
|
||||||
"Generates machine code for increasing or decreasing the given register a number of cell sizes bytes."
|
"Emits machine code for increasing or decreasing the given register a number of cell sizes bytes."
|
||||||
}
|
}
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $unchecked-example
|
{ $unchecked-example
|
||||||
|
@ -26,12 +26,29 @@ HELP: (%inc)
|
||||||
HELP: load-zone-offset
|
HELP: load-zone-offset
|
||||||
{ $values { "nursery-ptr" "a register symbol" } }
|
{ $values { "nursery-ptr" "a register symbol" } }
|
||||||
{ $description
|
{ $description
|
||||||
"Generates machine code for loading the address to the nursery into the machine register."
|
"Emits machine code for loading the address to the nursery into the machine register."
|
||||||
}
|
}
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $unchecked-example
|
{ $unchecked-example
|
||||||
"USING: cpu.x86 make prettyprint ;"
|
"USING: cpu.x86 make ;"
|
||||||
"[ RCX load-zone-offset ] B{ } make disassemble"
|
"[ RCX load-zone-offset ] B{ } make disassemble"
|
||||||
"0000000001b48f80: 498d4d10 lea rcx, [r13+0x10]"
|
"0000000001b48f80: 498d4d10 lea rcx, [r13+0x10]"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
HELP: copy-register*
|
||||||
|
{ $values
|
||||||
|
{ "dst" "a register symbol" }
|
||||||
|
{ "src" "a register symbol" }
|
||||||
|
{ "rep" "a value representation singleton" }
|
||||||
|
}
|
||||||
|
{ $description
|
||||||
|
"Emits machine code for copying from a register to another."
|
||||||
|
}
|
||||||
|
{ $examples
|
||||||
|
{ $unchecked-example
|
||||||
|
"USING: cpu.x86 make ;"
|
||||||
|
"[ XMM1 XMM2 double-rep copy-register* ] B{ } make disassemble"
|
||||||
|
"0000000533c61fe0: 0f28ca movaps xmm1, xmm2"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
Loading…
Reference in New Issue