def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxxxxxxx

        vars[0]: lhs1 (Rd)
        xprs[0]: rhs1 (Rn)
        xprs[1]: rhs2 (Rm)
        xprs[2]: rhsra (Ra)
        xprs[3]: (rhs1 * rhs2)
        xprs[4]: (rhs1 * rhs2) (simplified)
        xprs[5]: (rhsra + (rhs1 * rhs2))
        xprs[6]: (rhsra + (rhs1 * rhs2)) (simplified)
        """

        lhs = str(xdata.vars[0])
        prod = xdata.xprs[3]
        rprod = xdata.xprs[4]
        xprod = simplify_result(xdata.args[4], xdata.args[5], prod, rprod)
        xsum = xdata.xprs[5]
        rxsum = xdata.xprs[6]
        xxsum = simplify_result(xdata.args[6], xdata.args[7], xsum, rxsum)
        return (lhs + " := " + xxsum)
Пример #2
0
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxx .

        vars[0]: lhs
        xprs[0]: rhs1
        xprs[1]: value to be stored (syntactic)
        """

        lhs = str(xdata.vars[0])
        result = xdata.xprs[0]
        rresult = xdata.xprs[1]
        xresult = simplify_result(xdata.args[1], xdata.args[2], result,
                                  rresult)
        return lhs + " := " + xresult
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxxxx .

        vars[0]: lhs (Rd)
        xprs[0]: rhs1 (Rn)
        xprs[1]: rhs2 (Rm{..})
        xprs[2]: rhs1 + rhs2 (syntactic)
        xprs[3]: rhs1 + rhs2 (simplified)
        """

        lhs = str(xdata.vars[0])
        result = xdata.xprs[2]
        rresult = xdata.xprs[3]
        xresult = simplify_result(xdata.args[3], xdata.args[4], result, rresult)
        return lhs + " := " + xresult
Пример #4
0
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxxxx

        vars[0]: lhs
        xprs[0]: rhs1
        xprs[1]: rhs2
        xprs[2]: (rhs1 * rhs2) % e^32 (syntactic)
        xprs[3]: (rhs1 * rhs2) % e^32 (simplified)
        """

        lhs = str(xdata.vars[0])
        result = xdata.xprs[2]
        rresult = xdata.xprs[3]
        xresult = simplify_result(xdata.args[3], xdata.args[4], result,
                                  rresult)
        return lhs + " := " + xresult
Пример #5
0
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxxxx

        vars[0]: lhslo
        vars[1]: lhshi
        xprs[0]: rhs1
        xprs[1]: rhs2
        xprs[2]: (rhs1 * rhs2)
        xprs[3]: (rhs1 * rhs2)
        """

        lhslo = str(xdata.vars[0])
        lhshi = str(xdata.vars[1])
        result = xdata.xprs[2]
        rresult = xdata.xprs[3]
        xresult = simplify_result(xdata.args[4], xdata.args[5], result, rresult)
        return "(" + lhslo + "," + lhshi + ")" + " := " + xresult
Пример #6
0
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vx .

        vars[0]: lhs (Rd)
        xprs[0]: imm16
        xprs[1]: rhs (Rd)
        xprs[2]: rhs % 2^16
        xprs[3]: (rhs % 2^16) + (2^16 * imm16) (syntactic)
        xprs[4]: (rhs % 2^16) + (2^16 * imm16) (simplified)
        """

        lhs = str(xdata.vars[0])
        result = xdata.xprs[3]
        rresult = xdata.xprs[4]
        xresult = simplify_result(xdata.args[4], xdata.args[5], result,
                                  rresult)
        return lhs + " := " + xresult
Пример #7
0
    def annotation(self, xdata: InstrXData) -> str:
        """xdata format: a:vxxxx .

        vars[0]: lhs (Rd)
        xprs[0]: rhs1 (Rm/Rn)
        xprs[1]: rhs2 (Rm/imm)
        xprs[2]: rhs1 >> rhs2 (syntactic)
        xprs[3]: rhs1 >> rhs2 (simplified)
        args[4]: is-wide (thumb)
        """

        lhs = str(xdata.vars[0])
        result = xdata.xprs[1]
        rresult = xdata.xprs[2]
        xresult = simplify_result(xdata.args[2], xdata.args[3], result,
                                  rresult)
        return lhs + " := " + xresult