Re: [Qemu-devel] [PATCH 2/3] exec.c: Don't accidentally sign-extend 4-byte loads in subpage_read()

2018-06-12 Thread Richard Henderson
On 06/11/2018 07:10 AM, Peter Maydell wrote: > In subpage_read() we perform a load of the data into a local buffer > which we then access using ldub_p(), lduw_p(), ldl_p() or ldq_p() > depending on its size, storing the result into the uint64_t *data. > Since ldl_p() returns an 'int', this means th

[Qemu-devel] [PATCH 2/3] exec.c: Don't accidentally sign-extend 4-byte loads in subpage_read()

2018-06-11 Thread Peter Maydell
In subpage_read() we perform a load of the data into a local buffer which we then access using ldub_p(), lduw_p(), ldl_p() or ldq_p() depending on its size, storing the result into the uint64_t *data. Since ldl_p() returns an 'int', this means that for the 4-byte case we will sign-extend the data,