Revision dc259201
b/target-i386/translate.c | ||
---|---|---|
1169 | 1169 |
|
1170 | 1170 |
/* generate a conditional jump to label 'l1' according to jump opcode |
1171 | 1171 |
value 'b'. In the fast case, T0 is guaranted not to be used. */ |
1172 |
static inline void gen_jcc1_noeob(DisasContext *s, int b, int l1) |
|
1173 |
{ |
|
1174 |
CCPrepare cc = gen_prepare_cc(s, b, cpu_T[0]); |
|
1175 |
|
|
1176 |
if (cc.mask != -1) { |
|
1177 |
tcg_gen_andi_tl(cpu_T[0], cc.reg, cc.mask); |
|
1178 |
cc.reg = cpu_T[0]; |
|
1179 |
} |
|
1180 |
if (cc.use_reg2) { |
|
1181 |
tcg_gen_brcond_tl(cc.cond, cc.reg, cc.reg2, l1); |
|
1182 |
} else { |
|
1183 |
tcg_gen_brcondi_tl(cc.cond, cc.reg, cc.imm, l1); |
|
1184 |
} |
|
1185 |
} |
|
1186 |
|
|
1187 |
/* Generate a conditional jump to label 'l1' according to jump opcode |
|
1188 |
value 'b'. In the fast case, T0 is guaranted not to be used. |
|
1189 |
A translation block must end soon. */ |
|
1172 | 1190 |
static inline void gen_jcc1(DisasContext *s, int b, int l1) |
1173 | 1191 |
{ |
1174 | 1192 |
CCPrepare cc = gen_prepare_cc(s, b, cpu_T[0]); |
1175 | 1193 |
|
1194 |
gen_update_cc_op(s); |
|
1176 | 1195 |
if (cc.mask != -1) { |
1177 | 1196 |
tcg_gen_andi_tl(cpu_T[0], cc.reg, cc.mask); |
1178 | 1197 |
cc.reg = cpu_T[0]; |
1179 | 1198 |
} |
1199 |
set_cc_op(s, CC_OP_DYNAMIC); |
|
1180 | 1200 |
if (cc.use_reg2) { |
1181 | 1201 |
tcg_gen_brcond_tl(cc.cond, cc.reg, cc.reg2, l1); |
1182 | 1202 |
} else { |
... | ... | |
1310 | 1330 |
if (!s->jmp_opt) \ |
1311 | 1331 |
gen_op_jz_ecx(s->aflag, l2); \ |
1312 | 1332 |
gen_jmp(s, cur_eip); \ |
1313 |
set_cc_op(s, CC_OP_DYNAMIC); \ |
|
1314 | 1333 |
} |
1315 | 1334 |
|
1316 | 1335 |
GEN_REPZ(movs) |
... | ... | |
2379 | 2398 |
int l1, l2; |
2380 | 2399 |
|
2381 | 2400 |
if (s->jmp_opt) { |
2382 |
gen_update_cc_op(s); |
|
2383 | 2401 |
l1 = gen_new_label(); |
2384 | 2402 |
gen_jcc1(s, b, l1); |
2385 |
set_cc_op(s, CC_OP_DYNAMIC); |
|
2386 |
|
|
2403 |
|
|
2387 | 2404 |
gen_goto_tb(s, 0, next_eip); |
2388 | 2405 |
|
2389 | 2406 |
gen_set_label(l1); |
... | ... | |
6077 | 6094 |
}; |
6078 | 6095 |
op1 = fcmov_cc[op & 3] | (((op >> 3) & 1) ^ 1); |
6079 | 6096 |
l1 = gen_new_label(); |
6080 |
gen_jcc1(s, op1, l1); |
|
6097 |
gen_jcc1_noeob(s, op1, l1);
|
|
6081 | 6098 |
gen_helper_fmov_ST0_STN(cpu_env, tcg_const_i32(opreg)); |
6082 | 6099 |
gen_set_label(l1); |
6083 | 6100 |
} |
Also available in: Unified diff