| Submitter | Igor V. Kovalenko |
|---|---|
| Date | June 1, 2010, 8:12 p.m. |
| Message ID | <20100601201253.5908.41570.stgit@skyserv> |
| Download | mbox | patch |
| Permalink | /patch/54300/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 83067ae..4c5155f 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3307,7 +3307,7 @@ target_ulong helper_udiv(target_ulong a, target_ulong b) uint32_t x1; x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32); - x1 = b; + x1 = (b & 0xffffffff); if (x1 == 0) { raise_exception(TT_DIV_ZERO); @@ -3329,7 +3329,7 @@ target_ulong helper_sdiv(target_ulong a, target_ulong b) int32_t x1; x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32); - x1 = b; + x1 = (b & 0xffffffff); if (x1 == 0) { raise_exception(TT_DIV_ZERO);