Ejemplo n.º 1
0
    def decode(self):
        super(m3x,self).decode()
        names = {3:"set",4:"max",5:"min",6:"shl",7:"shr"}
        self.base = names[self.subop]
        if self.subop == 3:
            self.modifiers.append(lookup(logic_ops, self.subsubop))
        # else assume subsubop is 0           

        type = self.default_oper_type(OPER_PSIZE)
        self.dst_operands.append(self.decode_operand(type, 2))
        self.src_operands.append(self.decode_operand(type, 1))
        self.src_operands.append(self.decode_operand(type, 3, opt_imm=True))
Ejemplo n.º 2
0
    def decode(self):
        super(m3x, self).decode()
        names = {3: "set", 4: "max", 5: "min", 6: "shl", 7: "shr"}
        self.base = names[self.subop]
        if self.subop == 3:
            self.modifiers.append(lookup(logic_ops, self.subsubop))
        # else assume subsubop is 0

        type = self.default_oper_type(OPER_PSIZE)
        self.dst_operands.append(self.decode_operand(type, 2))
        self.src_operands.append(self.decode_operand(type, 1))
        self.src_operands.append(self.decode_operand(type, 3, opt_imm=True))
Ejemplo n.º 3
0
    def decode(self):
        super(atomic, self).decode()
        
        self.base = "atom"
        if self.subop == 0x7:
            self.modifiers.append(".out")

        self.modifiers.append(lookup(atomic_ops,self.bits(1,0x0000003C)))
            
        indirection = OP_INDIRECTION_GLOBAL
        type = self.default_oper_type(OPER_MSIZE)
        self.dst_operands.append(self.decode_operand(type, 1, indir=indirection))
        self.src_operands.append(self.decode_operand(type, 2))
        self.src_operands.append(self.decode_operand(type, 3))
Ejemplo n.º 4
0
    def decode(self):
        super(atomic, self).decode()

        self.base = "atom"
        if self.subop == 0x7:
            self.modifiers.append(".out")

        self.modifiers.append(lookup(atomic_ops, self.bits(1, 0x0000003C)))

        indirection = OP_INDIRECTION_GLOBAL
        type = self.default_oper_type(OPER_MSIZE)
        self.dst_operands.append(
            self.decode_operand(type, 1, indir=indirection))
        self.src_operands.append(self.decode_operand(type, 2))
        self.src_operands.append(self.decode_operand(type, 3))
Ejemplo n.º 5
0
    def decode(self):
        super(setf,self).decode()
        
        self.base = "set"
        self.modifiers.append(lookup(logic_ops, self.subsubop))

        dtype = self.default_oper_type(OPER_PSIZE)

        if self.subop == 0x7:
            stype = self.default_oper_type(OPER_FLOAT64)
        else:
            stype = self.default_oper_type(OPER_FLOAT32)

        self.dst_operands.append(self.decode_operand(dtype, 2))
        self.src_operands.append(self.decode_operand(stype, 1))
        self.src_operands.append(self.decode_operand(stype, 3))
Ejemplo n.º 6
0
    def decode(self):
        super(setf, self).decode()

        self.base = "set"
        self.modifiers.append(lookup(logic_ops, self.subsubop))

        dtype = self.default_oper_type(OPER_PSIZE)

        if self.subop == 0x7:
            stype = self.default_oper_type(OPER_FLOAT64)
        else:
            stype = self.default_oper_type(OPER_FLOAT32)

        self.dst_operands.append(self.decode_operand(dtype, 2))
        self.src_operands.append(self.decode_operand(stype, 1))
        self.src_operands.append(self.decode_operand(stype, 3))