On 02/07/2010 03:35 PM, Alexander Graf wrote:
It's technically implementation dependent but I don't know of an
implementation that doesn't sign extend.
Hrm, would
gpr = (s64)(s32)gpr;
work? :)
Yes. Integer promotion does guarantee sign extension.
Regards,
Anthony Liguori
Alex
--
To
Am 07.02.2010 um 17:27 schrieb Anthony Liguori :
On 02/07/2010 06:32 AM, Avi Kivity wrote:
On 02/04/2010 05:55 PM, Alexander Graf wrote:
The guest I was trying to get to run uses the LHA and LHAU
instructions.
Those instructions basically do a load, but also sign extend the
result.
Since
On 02/07/2010 06:32 AM, Avi Kivity wrote:
On 02/04/2010 05:55 PM, Alexander Graf wrote:
The guest I was trying to get to run uses the LHA and LHAU instructions.
Those instructions basically do a load, but also sign extend the result.
Since we need to fill our registers by hand when doing MMIO,
On 02/07/2010 05:51 PM, Alexander Graf wrote:
+if (vcpu->arch.mmio_sign_extend) {
+switch (run->mmio.len) {
+#ifdef CONFIG_PPC64
+case 4:
+if (gpr& 0x8000)
+gpr |= 0xULL;
+break;
Wouldn't
gpr = (s64)(gpr << 32)
Am 07.02.2010 um 13:32 schrieb Avi Kivity :
On 02/04/2010 05:55 PM, Alexander Graf wrote:
The guest I was trying to get to run uses the LHA and LHAU
instructions.
Those instructions basically do a load, but also sign extend the
result.
Since we need to fill our registers by hand when doin
On 02/04/2010 05:55 PM, Alexander Graf wrote:
The guest I was trying to get to run uses the LHA and LHAU instructions.
Those instructions basically do a load, but also sign extend the result.
Since we need to fill our registers by hand when doing MMIO, we also need
to sign extend manually.
This
The guest I was trying to get to run uses the LHA and LHAU instructions.
Those instructions basically do a load, but also sign extend the result.
Since we need to fill our registers by hand when doing MMIO, we also need
to sign extend manually.
This patch implements sign extended MMIO and the LHA