Search in sources :

Example 6 with Amd64

use of suite.assembler.Amd64 in project suite by stupidsing.

the class RegisterSet method get_.

private OpReg get_(int size) {
    OpReg r = get_();
    int reg = r.reg;
    if (// AL, BL, CL or DL
    size == 1 && reg < 4)
        return amd64.reg8[reg];
    else if (size == 2)
        return amd64.reg16[reg];
    else if (size == 4)
        return r;
    else if (size == 8)
        return amd64.reg64[reg];
    else
        return Fail.t("cannot allocate register with size " + size);
}
Also used : OpReg(suite.assembler.Amd64.OpReg)

Aggregations

OpMem (suite.assembler.Amd64.OpMem)3 OpReg (suite.assembler.Amd64.OpReg)3 Operand (suite.assembler.Amd64.Operand)3 Node (suite.node.Node)3 OpImm (suite.assembler.Amd64.OpImm)2 Int (suite.node.Int)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Amd64 (suite.assembler.Amd64)1 Insn (suite.assembler.Amd64.Insn)1 Funp (suite.funp.Funp_.Funp)1 FunpDontCare (suite.funp.P0.FunpDontCare)1 FunpNumber (suite.funp.P0.FunpNumber)1 FunpTree (suite.funp.P0.FunpTree)1 FunpTree2 (suite.funp.P0.FunpTree2)1 FunpFramePointer (suite.funp.P2.FunpFramePointer)1 FunpMemory (suite.funp.P2.FunpMemory)1 Tree (suite.node.Tree)1 Operator (suite.node.io.Operator)1 TermOp (suite.node.io.TermOp)1