compile.codegen.relocation: make doc example work on 32-bit.
parent
c3210f9f4f
commit
25ff85331c
|
|
@ -15,9 +15,15 @@ HELP: compiled-offset
|
||||||
{ $description "The current compiled code offset. Used for (among other things) calculating jump labels." }
|
{ $description "The current compiled code offset. Used for (among other things) calculating jump labels." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example
|
{ $example
|
||||||
"USING: compiler.codegen.relocation cpu.x86.assembler cpu.x86.assembler.operands make prettyprint ;"
|
"USING: compiler.codegen.relocation cpu.x86.assembler"
|
||||||
"[ init-relocation RAX 0 MOV compiled-offset ] B{ } make . ."
|
"cpu.x86.assembler.operands kernel layouts make prettyprint ;"
|
||||||
"B{ 72 184 0 0 0 0 0 0 0 0 }\n10"
|
"[ 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"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue