Lines Matching defs:opcode

94 	assert(insn->opcode == OP_PHI);
102 assert(def->opcode == OP_PHISOURCE);
149 if (!br || br->opcode != OP_CBR)
335 switch (insn->opcode) {
409 return opcode_table[insn->opcode].flags & OPF_TARGET;
442 // is @src generated by an instruction with the given opcode and size?
450 if (def->opcode != op)
492 // @op: the instruction's new opcode
497 insn->opcode = op;
506 // @op: the instruction's new opcode
511 insn->opcode = op;
517 // replace binop's opcode and values
519 // @op: the instruction's new opcode
525 insn->opcode = op;
534 // replace the opcode of an instruction
538 insn->opcode = op;
561 out->opcode = op_out;
562 in->opcode = op_in;
570 return replace_insn_pair(out, in->opcode, in, out->opcode, a, b, c);
587 return p->def->opcode;
615 if (src && src->opcode == OP_ZEXT && src->orig_type) {
784 if (and->opcode != OP_AND)
861 if (sh->opcode == OP_LSR)
887 if (opcode_table[insn->opcode].flags & OPF_COMPARE)
889 return eval_op(insn->opcode, size, insn->src1, insn->src2);
926 switch (insn->opcode) {
933 switch (def->opcode) {
945 if (def->opcode == OP_LSR)
946 insn->opcode = OP_LSR;
958 insn->opcode = OP_LSR;
981 def->opcode = OP_LSR;
983 insn->opcode = OP_AND;
1052 insn->opcode = OP_AND;
1065 switch (insn->opcode) {
1076 insn->opcode = OP_NEG;
1090 int opcode;
1101 inverse = (insn->opcode == OP_SET_NE) == value;
1110 opcode = def->opcode;
1111 switch (opcode) {
1130 insn->opcode = inverse ? opcode_table[opcode].negate : opcode;
1161 def->opcode = OP_AND;
1179 switch (insn->opcode) {
1279 switch (insn->opcode) {
1294 if (insn->opcode == OP_SET_LT)
1307 if (insn->opcode == OP_SET_GE)
1340 switch (insn->opcode) {
1392 switch (insn->opcode) {
1423 switch (insn->opcode) {
1439 const struct opcode_table *op = &opcode_table[insn->opcode];
1441 insn->opcode = op->sign;
1445 switch (insn->opcode) {
1509 switch (def->opcode) {
1513 insn->opcode = OP_SUB;
1529 switch (insn->opcode) {
1537 insn->opcode = OP_NOT;
1547 insn->opcode = OP_ADD;
1595 switch (def->opcode) {
1605 insn->opcode = OP_ADD;
1618 switch (insn->opcode) {
1653 switch (insn->opcode) {
1753 insn->opcode = opcode_table[insn->opcode].swap;
1812 if (def->opcode != insn->opcode)
1818 insn->src2 = eval_op(insn->opcode, insn->size, insn->src2, def->src2);
1895 insn->opcode = OP_ADD;
1913 if ((src = is_same_op(src2, def->opcode, osize))) {
1914 const struct opcode_table *op = &opcode_table[insn->opcode];
1915 if ((def->opcode == OP_ZEXT) && (op->flags & OPF_SIGNED))
1916 insn->opcode = op->sign;
1937 if (DEF_OPCODE(defr, *p2) == opcode_negate(def->opcode)) {
1941 if (def->opcode == OP_SET_GE && is_zero(def->src2)) {
1973 if (DEF_OPCODE(defr, *p2) == def->opcode && defr->src2 == def->src2) {
2021 if (DEF_OPCODE(defr, *p2) == opcode_negate(def->opcode)) {
2027 if (DEF_OPCODE(defr, *p2) == def->opcode && defr->src2 == def->src2) {
2075 if (DEF_OPCODE(defr, *p2) == opcode_negate(def->opcode)) {
2081 if (DEF_OPCODE(defr, *p2) == def->opcode && defr->src2 == def->src2) {
2104 switch (insn->opcode) {
2137 switch (insn->opcode) {
2143 insn->opcode = OP_SUB; // ~(x + C) --> ~C - x
2148 insn->opcode = OP_SUB; // ~(-x) --> x - 1
2156 insn->opcode = OP_ADD; // ~(C - x) --> x + ~C
2162 insn->opcode = OP_XOR; // ~(x ^ C) --> x ^ ~C
2172 insn->opcode = OP_SUB; // -(x + C) --> (-C - x)
2179 insn->opcode = OP_ADD; // -(~x) --> x + 1
2183 insn->opcode = OP_SUB; // -(x - y) --> y - x
2201 if (def->opcode == OP_SYMADDR && def->src) {
2206 if (def->opcode == OP_ADD) {
2282 switch (insn->opcode) {
2286 def->opcode = OP_TRUNC;
2291 insn->opcode = OP_AND;
2313 def->opcode = OP_ZEXT;
2317 insn->opcode = OP_AND;
2323 switch (insn->opcode) {
2336 insn->opcode = def->opcode;
2343 switch (insn->opcode) {
2347 insn->opcode = OP_NOT;
2349 def->opcode = OP_TRUNC;
2358 switch (insn->opcode) {
2366 if (insn->opcode != OP_TRUNC)
2371 switch (insn->opcode) {
2383 insn->opcode = OP_ASR;
2389 insn->opcode = OP_AND;
2395 switch (insn->opcode) {
2397 insn->opcode = OP_ZEXT;
2405 switch (insn->opcode) {
2411 insn->opcode = def->opcode;
2415 switch (insn->opcode) {
2446 int opcode = OP_SET_EQ;
2449 opcode = OP_SET_NE;
2451 insn->opcode = opcode;
2480 def->opcode = opcode_negate(def->opcode);
2520 insn->opcode = (s1 < s2) ? OP_SHL : OP_LSR;
2594 if (def->opcode == OP_SET_EQ) {
2618 if (def->opcode == OP_SET_NE || def->opcode == OP_SET_EQ) {
2624 if (def->opcode == OP_SEL) {
2640 if (def->opcode == OP_SEXT || def->opcode == OP_ZEXT)
2689 insn->opcode = OP_CBR;
2707 insn->opcode = OP_BR;
2720 insn->opcode = OP_LABEL;
2734 flags = opcode_table[insn->opcode].flags;
2756 switch (insn->opcode) {