]> gitweb.factorcode.org Git - factor.git/commitdiff
Docs: for cpu.x86.* words
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 4 May 2014 23:38:43 +0000 (01:38 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 11 May 2014 00:13:48 +0000 (17:13 -0700)
basis/cpu/x86/64/64-docs.factor [new file with mode: 0644]
basis/cpu/x86/x86-docs.factor [new file with mode: 0644]

diff --git a/basis/cpu/x86/64/64-docs.factor b/basis/cpu/x86/64/64-docs.factor
new file mode 100644 (file)
index 0000000..e13bddf
--- /dev/null
@@ -0,0 +1,11 @@
+USING: help.markup help.syntax math ;
+IN: cpu.x86.64
+
+HELP: vm-reg
+{ $description
+  "Symbol of the machine register that holds the address of the virtual machine."
+} ;
+
+HELP: param-reg
+{ $values { "n" number } { "reg" "a register symbol" } }
+{ $description "Symbol of the machine register for the nth function parameter (0-based)." } ;
diff --git a/basis/cpu/x86/x86-docs.factor b/basis/cpu/x86/x86-docs.factor
new file mode 100644 (file)
index 0000000..a2be230
--- /dev/null
@@ -0,0 +1,37 @@
+USING: help.markup help.syntax ;
+IN: cpu.x86
+
+HELP: stack-reg
+{ $description
+  "Symbol of the machine register that holds the (cpu) stack address."
+} ;
+
+HELP: ds-reg
+{ $description
+  "Symbol of the machine register that holds the address to the data stack's location."
+} ;
+
+HELP: (%inc)
+{ $description
+  "Generates machine code for increasing or decreasing the given register a number of cell sizes bytes."
+}
+{ $examples
+  { $unchecked-example
+    "USING: cpu.x86 make prettyprint ;"
+    "[ 8 ECX (%inc) ] B{ } make disassemble"
+    "00000000615e5140: 83c140  add ecx, 0x40"
+  }
+} ;
+
+HELP: load-zone-offset
+{ $values { "nursery-ptr" "a register symbol" } }
+{ $description
+  "Generates machine code for loading the address to the nursery into the machine register."
+}
+{ $examples
+  { $unchecked-example
+    "USING: cpu.x86 make prettyprint ;"
+    "[ RCX load-zone-offset ] B{ } make disassemble"
+    "0000000001b48f80: 498d4d10  lea rcx, [r13+0x10]"
+  }
+} ;