compile.codegen.relocation: make doc example work on 32-bit.

db4
John Benediktsson 2014-05-11 08:21:13 -07:00
parent c3210f9f4f
commit 25ff85331c
1 changed files with 9 additions and 3 deletions

View File

@ -15,9 +15,15 @@ HELP: compiled-offset
{ $description "The current compiled code offset. Used for (among other things) calculating jump labels." }
{ $examples
{ $example
"USING: compiler.codegen.relocation cpu.x86.assembler cpu.x86.assembler.operands make prettyprint ;"
"[ init-relocation RAX 0 MOV compiled-offset ] B{ } make . ."
"B{ 72 184 0 0 0 0 0 0 0 0 }\n10"
"USING: compiler.codegen.relocation cpu.x86.assembler"
"cpu.x86.assembler.operands kernel layouts make prettyprint ;"
"[ init-relocation RAX 0 MOV compiled-offset ] B{ } make"
"cell-bits 64 = ["
" [ 10 = ] [ B{ 72 184 0 0 0 0 0 0 0 0 } = ] bi*"
"] ["
" [ 6 = ] [ B{ 72 184 0 0 0 0 } = ] bi*"
"] if . ."
"t\nt"
}
} ;