Message ID | 1436284361-5745-4-git-send-email-agraf@suse.de |
---|---|
State | New |
Headers | show |
diff --git a/target-s390x/int_helper.c b/target-s390x/int_helper.c index 2c2b3f6..a46c736 100644 --- a/target-s390x/int_helper.c +++ b/target-s390x/int_helper.c @@ -121,11 +121,12 @@ uint64_t HELPER(clz)(uint64_t v) return clz64(v); } -uint64_t HELPER(cvd)(int32_t bin) +uint64_t HELPER(cvd)(int32_t reg) { /* positive 0 */ uint64_t dec = 0x0c; - int shift = 4; + int64_t bin = reg; + int shift; if (bin < 0) { bin = -bin; @@ -133,9 +134,7 @@ uint64_t HELPER(cvd)(int32_t bin) } for (shift = 4; (shift < 64) && bin; shift += 4) { - int current_number = bin % 10; - - dec |= (current_number) << shift; + dec |= (bin % 10) << shift; bin /= 10; }