-void x86_64_emit_ishiftconst(codegendata *cd, s4 shift_op, stackptr src, instruction *iptr)
-{
- s4 s1 = src->regoff;
- s4 d = iptr->dst->regoff;
-
- if ((src->flags & INMEMORY) && (iptr->dst->flags & INMEMORY)) {
- if (s1 == d) {
- x86_64_shiftl_imm_membase(cd, shift_op, iptr->val.i, REG_SP, d * 8);
-
- } else {
- x86_64_movl_membase_reg(cd, REG_SP, s1 * 8, REG_ITMP1);
- x86_64_shiftl_imm_reg(cd, shift_op, iptr->val.i, REG_ITMP1);
- x86_64_movl_reg_membase(cd, REG_ITMP1, REG_SP, d * 8);
- }
-
- } else if ((src->flags & INMEMORY) && !(iptr->dst->flags & INMEMORY)) {
- x86_64_movl_membase_reg(cd, REG_SP, s1 * 8, d);
- x86_64_shiftl_imm_reg(cd, shift_op, iptr->val.i, d);
-
- } else if (!(src->flags & INMEMORY) && (iptr->dst->flags & INMEMORY)) {
- x86_64_movl_reg_membase(cd, s1, REG_SP, d * 8);
- x86_64_shiftl_imm_membase(cd, shift_op, iptr->val.i, REG_SP, d * 8);
-
- } else {
- M_INTMOVE(s1, d);
- x86_64_shiftl_imm_reg(cd, shift_op, iptr->val.i, d);
- }
-}
-
-
-void x86_64_emit_lshiftconst(codegendata *cd, s4 shift_op, stackptr src, instruction *iptr)
-{
- s4 s1 = src->regoff;
- s4 d = iptr->dst->regoff;
-
- if ((src->flags & INMEMORY) && (iptr->dst->flags & INMEMORY)) {
- if (s1 == d) {
- x86_64_shift_imm_membase(cd, shift_op, iptr->val.i, REG_SP, d * 8);
-
- } else {
- x86_64_mov_membase_reg(cd, REG_SP, s1 * 8, REG_ITMP1);
- x86_64_shift_imm_reg(cd, shift_op, iptr->val.i, REG_ITMP1);
- x86_64_mov_reg_membase(cd, REG_ITMP1, REG_SP, d * 8);
- }
-
- } else if ((src->flags & INMEMORY) && !(iptr->dst->flags & INMEMORY)) {
- x86_64_mov_membase_reg(cd, REG_SP, s1 * 8, d);
- x86_64_shift_imm_reg(cd, shift_op, iptr->val.i, d);
-
- } else if (!(src->flags & INMEMORY) && (iptr->dst->flags & INMEMORY)) {
- x86_64_mov_reg_membase(cd, s1, REG_SP, d * 8);
- x86_64_shift_imm_membase(cd, shift_op, iptr->val.i, REG_SP, d * 8);
-
- } else {
- M_INTMOVE(s1, d);
- x86_64_shift_imm_reg(cd, shift_op, iptr->val.i, d);
- }
-}
-
-
-void x86_64_emit_ifcc(codegendata *cd, s4 if_op, stackptr src, instruction *iptr)
-{
- if (src->flags & INMEMORY)
- M_ICMP_IMM_MEMBASE(iptr->val.i, REG_SP, src->regoff * 8);
- else {
- if (iptr->val.i == 0)
- M_ITEST(src->regoff);
- else
- M_ICMP_IMM(iptr->val.i, src->regoff);
- }
-
- /* If the conditional branch is part of an if-converted block,
- don't generate the actual branch. */
-
- if ((iptr->opc & ICMD_CONDITION_MASK) == 0) {
- x86_64_jcc(cd, if_op, 0);
- codegen_addreference(cd, (basicblock *) iptr->target);
- }
-}
-