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& 0x80000000)
+ gpr |= 0xffffffff00000000ULL;
+ break;
Wouldn't
gpr = (s64)(gpr << 32) >> 32;
work? Not sure if >> is guaranteed to sign extend.
Not sure either. The code as is is rather obvious imho, so I wouldn't
want to replace it with anything that's even remotely magical.
That's fair.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html