|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH] target-s390x: fix CONVERT TO BINARY (CVD, CVDY) |
Date: | Mon, 29 Jun 2015 10:28:43 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
On 06/25/2015 08:16 PM, Aurelien Jarno wrote:
for (shift = 4; (shift < 64) && bin; shift += 4) { - int current_number = bin % 10; - - dec |= (current_number) << shift; + dec |= (bin % 10) << shift; bin /= 10; }
You've changed from 32-bit division to 64-bit division just to solve a problem with the shift. Better to just change the type of current_number there.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |