|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Allocator.CodeAllocator.x86CodeBuffer
public abstract static class CodeAllocator.x86CodeBuffer
This class provides the interface for x86 code buffers. These code buffers are used to store generated x86 code. After the code is generated, use the allocateCodeBlock method to obtain a jq_CompiledCode object.
Constructor Summary | |
---|---|
CodeAllocator.x86CodeBuffer()
|
Method Summary | |
---|---|
abstract void |
add1(byte i)
Adds one byte to the end of this code buffer. |
abstract void |
add2_endian(int i)
Adds two bytes (little-endian) to the end of this code buffer. |
abstract void |
add2(int i)
Adds two bytes (big-endian) to the end of this code buffer. |
abstract void |
add3(int i)
Adds three bytes (big-endian) to the end of this code buffer. |
abstract void |
add4_endian(int i)
Adds four bytes (little-endian) to the end of this code buffer. |
abstract jq_CompiledCode |
allocateCodeBlock(jq_Method m,
jq_TryCatch[] ex,
jq_BytecodeMap bcm,
ExceptionDeliverer x,
int stackframesize,
List codeRelocs,
List dataRelocs)
Uses the code in this buffer, along with the arguments, to create a jq_CompiledCode object. |
abstract byte |
get1(int k)
Gets the byte at the given offset in this code buffer. |
abstract int |
get4_endian(int k)
Gets the (little-endian) 4 bytes at the given offset in this code buffer. |
abstract CodeAddress |
getCurrentAddress()
Returns the current address in this code buffer. |
abstract int |
getCurrentOffset()
Returns the current offset in this code buffer. |
abstract CodeAddress |
getStartAddress()
Returns the current address in this code buffer. |
abstract void |
put1(int k,
byte instr)
Sets the byte at the given offset to the given value. |
abstract void |
put4_endian(int k,
int instr)
Sets the 4 bytes at the given offset to the given (little-endian) value. |
abstract void |
setEntrypoint()
Sets the current address as the entrypoint to this code buffer. |
abstract void |
skip(int nbytes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CodeAllocator.x86CodeBuffer()
Method Detail |
---|
public abstract int getCurrentOffset()
public abstract CodeAddress getStartAddress()
public abstract CodeAddress getCurrentAddress()
public abstract void setEntrypoint()
public abstract void add1(byte i)
i
- the byte to addpublic abstract void add2_endian(int i)
i
- the little-endian value to addpublic abstract void add2(int i)
i
- the big-endian value to addpublic abstract void add3(int i)
i
- the big-endian value to addpublic abstract void add4_endian(int i)
i
- the little-endian value to addpublic abstract byte get1(int k)
k
- offset of byte to return
public abstract int get4_endian(int k)
k
- offset of little-endian 4 bytes to return
public abstract void put1(int k, byte instr)
k
- offset of byte to setinstr
- value to set it topublic abstract void put4_endian(int k, int instr)
k
- offset of 4 bytes to setinstr
- little-endian value to set it topublic abstract void skip(int nbytes)
public abstract jq_CompiledCode allocateCodeBlock(jq_Method m, jq_TryCatch[] ex, jq_BytecodeMap bcm, ExceptionDeliverer x, int stackframesize, List codeRelocs, List dataRelocs)
m
- Java method of this code block, or null if noneex
- exception handler table, or null if nonebcm
- bytecode map, or null if nonex
- exception deliverer to use for this code, or null if nonestackframesize
- size of stack frame in bytescodeRelocs
- list of code relocations for this code buffer, or
null if nonedataRelocs
- list of data relocations for this code buffer, or
null if none
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |