Commit 000cacf6f9dce7d71f88aadf7e9b3688eaa3ab69
1 parent
9dc63a1e
Fix crc32w decoding, fix a constant width in blendvpd.
Forced the constant's width to long long so that it doesn't overflow, problem spotted by C. W. Betts. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5417 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
4 additions
and
5 deletions
target-i386/ops_sse.h
... | ... | @@ -1481,7 +1481,7 @@ void glue(name, SUFFIX) (Reg *d, Reg *s, uint32_t imm)\ |
1481 | 1481 | /* SSE4.1 op helpers */ |
1482 | 1482 | #define FBLENDVB(d, s, m) (m & 0x80) ? s : d |
1483 | 1483 | #define FBLENDVPS(d, s, m) (m & 0x80000000) ? s : d |
1484 | -#define FBLENDVPD(d, s, m) (m & 0x8000000000000000) ? s : d | |
1484 | +#define FBLENDVPD(d, s, m) (m & 0x8000000000000000LL) ? s : d | |
1485 | 1485 | SSE_HELPER_V(helper_pblendvb, B, 16, FBLENDVB) |
1486 | 1486 | SSE_HELPER_V(helper_blendvps, L, 4, FBLENDVPS) |
1487 | 1487 | SSE_HELPER_V(helper_blendvpd, Q, 2, FBLENDVPD) | ... | ... |
target-i386/translate.c
... | ... | @@ -3568,17 +3568,16 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) |
3568 | 3568 | reg = ((modrm >> 3) & 7) | rex_r; |
3569 | 3569 | gen_op_mov_reg_T0(OT_LONG, reg); |
3570 | 3570 | break; |
3571 | - case 0x038: | |
3572 | 3571 | case 0x138: |
3572 | + if (s->prefix & PREFIX_REPNZ) | |
3573 | + goto crc32; | |
3574 | + case 0x038: | |
3573 | 3575 | b = modrm; |
3574 | 3576 | modrm = ldub_code(s->pc++); |
3575 | 3577 | rm = modrm & 7; |
3576 | 3578 | reg = ((modrm >> 3) & 7) | rex_r; |
3577 | 3579 | mod = (modrm >> 6) & 3; |
3578 | 3580 | |
3579 | - if (s->prefix & PREFIX_REPNZ) | |
3580 | - goto crc32; | |
3581 | - | |
3582 | 3581 | sse_op2 = sse_op_table6[b].op[b1]; |
3583 | 3582 | if (!sse_op2) |
3584 | 3583 | goto illegal_op; | ... | ... |