** Code commutative operators ('+', '*'). If first operand is a ** numeric constant, change order of operands to try to use an ** immediate or K operator. */
| 1514 | ** immediate or K operator. |
| 1515 | */ |
| 1516 | static void codecommutative (FuncState *fs, BinOpr op, |
| 1517 | expdesc *e1, expdesc *e2, int line) { |
| 1518 | int flip = 0; |
| 1519 | if (tonumeral(e1, NULL)) { /* is first operand a numeric constant? */ |
| 1520 | swapexps(e1, e2); /* change order */ |
| 1521 | flip = 1; |
| 1522 | } |
| 1523 | if (op == OPR_ADD && isSCint(e2)) /* immediate operand? */ |
| 1524 | codebini(fs, OP_ADDI, e1, e2, flip, line, TM_ADD); |
| 1525 | else |
| 1526 | codearith(fs, op, e1, e2, flip, line); |
| 1527 | } |
| 1528 | |
| 1529 | |
| 1530 | /* |