2304 |
case 0x58 ... 0x5f: /* pop */ |
case 0x58 ... 0x5f: /* pop */ |
2305 |
ot = dflag ? OT_LONG : OT_WORD; |
ot = dflag ? OT_LONG : OT_WORD; |
2306 |
gen_pop_T0(s); |
gen_pop_T0(s); |
2307 |
gen_op_mov_reg_T0[ot][b & 7](); |
/* NOTE: order is important for pop %sp */ |
2308 |
gen_pop_update(s); |
gen_pop_update(s); |
2309 |
|
gen_op_mov_reg_T0[ot][b & 7](); |
2310 |
break; |
break; |
2311 |
case 0x60: /* pusha */ |
case 0x60: /* pusha */ |
2312 |
gen_pusha(s); |
gen_pusha(s); |
2327 |
case 0x8f: /* pop Ev */ |
case 0x8f: /* pop Ev */ |
2328 |
ot = dflag ? OT_LONG : OT_WORD; |
ot = dflag ? OT_LONG : OT_WORD; |
2329 |
modrm = ldub_code(s->pc++); |
modrm = ldub_code(s->pc++); |
2330 |
|
mod = (modrm >> 6) & 3; |
2331 |
gen_pop_T0(s); |
gen_pop_T0(s); |
2332 |
s->popl_esp_hack = 2 << dflag; |
if (mod == 3) { |
2333 |
gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1); |
/* NOTE: order is important for pop %sp */ |
2334 |
s->popl_esp_hack = 0; |
gen_pop_update(s); |
2335 |
gen_pop_update(s); |
rm = modrm & 7; |
2336 |
|
gen_op_mov_reg_T0[ot][rm](); |
2337 |
|
} else { |
2338 |
|
/* NOTE: order is important too for MMU exceptions */ |
2339 |
|
s->popl_esp_hack = 2 << dflag; |
2340 |
|
gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1); |
2341 |
|
s->popl_esp_hack = 0; |
2342 |
|
gen_pop_update(s); |
2343 |
|
} |
2344 |
break; |
break; |
2345 |
case 0xc8: /* enter */ |
case 0xc8: /* enter */ |
2346 |
{ |
{ |