Class Assembler


  • @Deprecated
    public final class Assembler
    extends Serializer
    Deprecated.
    Low level code generation.
    • Field Detail

      • _buffer

        private final CodeBuffer _buffer
        Deprecated.
      • _relocData

        private final java.util.List<RelocData> _relocData
        Deprecated.
      • cpuInfo

        private final CpuInfo cpuInfo
        Deprecated.
      • _properties

        private int _properties
        Deprecated.
      • _trampolineSize

        int _trampolineSize
        Deprecated.
        Size of possible trampolines.
      • _logger

        private final Logger _logger
        Deprecated.
      • cpu

        private final CPU cpu
        Deprecated.
      • I386

        public static final CPU I386
        Deprecated.
      • X86_64

        public static final CPU X86_64
        Deprecated.
      • nop1

        private static final int[] nop1
        Deprecated.
      • nop2

        private static final int[] nop2
        Deprecated.
      • nop3

        private static final int[] nop3
        Deprecated.
      • nop4

        private static final int[] nop4
        Deprecated.
      • nop5

        private static final int[] nop5
        Deprecated.
      • nop6

        private static final int[] nop6
        Deprecated.
      • nop7

        private static final int[] nop7
        Deprecated.
      • nop8

        private static final int[] nop8
        Deprecated.
      • nop9

        private static final int[] nop9
        Deprecated.
      • nop10

        private static final int[] nop10
        Deprecated.
      • nop11

        private static final int[] nop11
        Deprecated.
    • Constructor Detail

      • Assembler

        public Assembler​(CPU cpu)
        Deprecated.
    • Method Detail

      • intValue

        private static final int intValue​(boolean b)
        Deprecated.
      • offset

        public final int offset()
        Deprecated.
      • codeSize

        public final int codeSize()
        Deprecated.
        Gets the required size of memory required to store all the generated code
      • trampolineSize

        int trampolineSize()
        Deprecated.
        Return size of all possible trampolines needed to successfuly generate relative jumps to absolute addresses. This value is only non-zero if jmp of call instructions were used with immediate operand (this means jump or call absolute address directly). Currently only _emitJmpOrCallReloc() method can increase trampoline size value.
      • getByteAt

        public final byte getByteAt​(int pos)
        Deprecated.
      • getWordAt

        public final short getWordAt​(int pos)
        Deprecated.
      • getDWordAt

        public final int getDWordAt​(int pos)
        Deprecated.
      • getQWordAt

        public final long getQWordAt​(int pos)
        Deprecated.
      • setByteAt

        public final void setByteAt​(int pos,
                                    byte x)
        Deprecated.
      • setWordAt

        public final void setWordAt​(int pos,
                                    short x)
        Deprecated.
      • setDWordAt

        public final void setDWordAt​(int pos,
                                     int x)
        Deprecated.
      • setQWordAt

        public final void setQWordAt​(int pos,
                                     long x)
        Deprecated.
      • getInt32At

        public final int getInt32At​(int pos)
        Deprecated.
      • setInt32At

        public final void setInt32At​(int pos,
                                     long x)
        Deprecated.
      • setVarAt

        public final void setVarAt​(int pos,
                                   long i,
                                   boolean isUnsigned,
                                   int size)
        Deprecated.
      • _emitByte

        final void _emitByte​(int x)
        Deprecated.
        Emit Byte to internal buffer.
      • _emitWord

        final void _emitWord​(int x)
        Deprecated.
        Emit Word (2 bytes) to internal buffer.
      • _emitDWord

        final void _emitDWord​(int x)
        Deprecated.
        Emit DWord (4 bytes) to internal buffer.
      • _emitQWord

        final void _emitQWord​(long x)
        Deprecated.
        Emit QWord (8 bytes) to internal buffer.
      • _emitInt32

        final void _emitInt32​(int x)
        Deprecated.
        Emit Int32 (4 bytes) to internal buffer.
      • _emitSysInt

        final void _emitSysInt​(long x)
        Deprecated.
        Emit system signed integer (4 or 8 bytes) to internal buffer.
      • _emitOpCode

        final void _emitOpCode​(int opCode)
        Deprecated.
      • _emitSegmentPrefix

        void _emitSegmentPrefix​(Operand rm)
        Deprecated.
      • _emitImmediate

        void _emitImmediate​(Immediate imm,
                            int size)
        Deprecated.
      • _emitRexR

        void _emitRexR​(int w,
                       int opReg,
                       int regCode)
        Deprecated.
        Emit REX prefix (64 bit mode only).
      • _emitRexR

        void _emitRexR​(boolean w,
                       int opReg,
                       int regCode)
        Deprecated.
      • _emitRexRM

        void _emitRexRM​(int w,
                        int opReg,
                        Operand rm)
        Deprecated.
        Emit REX prefix (64 bit mode only).
      • _emitRexRM

        void _emitRexRM​(boolean w,
                        int opReg,
                        Operand rm)
        Deprecated.
      • _emitModM

        void _emitModM​(int opReg,
                       Mem mem,
                       int immSize)
        Deprecated.
      • _emitX86Inl

        void _emitX86Inl​(int opCode,
                         boolean i16bit,
                         boolean rexw,
                         int reg)
        Deprecated.
      • _emitX86Inl

        void _emitX86Inl​(int opCode,
                         boolean i16bit,
                         int rexw,
                         int reg)
        Deprecated.
      • _emitModRM

        void _emitModRM​(int opReg,
                        Operand op,
                        int immSize)
        Deprecated.
      • _emitMod

        void _emitMod​(int m,
                      int o,
                      int r)
        Deprecated.
        Emit MODR/M byte.
      • _emitSib

        void _emitSib​(int s,
                      int i,
                      int b)
        Deprecated.
        Emit SIB byte.
      • _emitModR

        void _emitModR​(int opReg,
                       int r)
        Deprecated.
        Emit Register / Register - calls _emitMod(3, opReg, r)
      • _emitModR

        void _emitModR​(int opReg,
                       BaseReg r)
        Deprecated.
        Emit Register / Register - calls _emitMod(3, opReg, r.code())
      • _emitX86RM

        void _emitX86RM​(int opCode,
                        boolean i16bit,
                        boolean rexw,
                        int o,
                        Operand op,
                        int immSize)
        Deprecated.
      • _emitX86RM

        void _emitX86RM​(int opCode,
                        boolean i16bit,
                        int rexw,
                        int o,
                        Operand op,
                        int immSize)
        Deprecated.
      • _emitFpu

        void _emitFpu​(int opCode)
        Deprecated.
      • _emitFpuSTI

        void _emitFpuSTI​(int opCode,
                         int sti)
        Deprecated.
      • _emitFpuMEM

        void _emitFpuMEM​(int opCode,
                         int opReg,
                         Mem mem)
        Deprecated.
      • _emitMmu

        void _emitMmu​(int opCode,
                      int rexw,
                      int opReg,
                      Operand src,
                      int immSize)
        Deprecated.
      • _emitDisplacement

        LinkData _emitDisplacement​(Label label,
                                   long inlinedDisplacement,
                                   int size)
        Deprecated.
      • _emitJmpOrCallReloc

        void _emitJmpOrCallReloc​(InstructionGroup instruction,
                                 long target)
        Deprecated.
      • relocCode

        public void relocCode​(java.nio.ByteBuffer buffer,
                              long address)
        Deprecated.
      • align

        public void align​(long m)
        Deprecated.