diff mbox

[trivial,0.14+] fix compile error on i386

Message ID 20110205092735.201CB12B63@gandalf.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev Feb. 5, 2011, 9:27 a.m. UTC
When compiling on i386 (32bit) compiler choles on this:

  CC    x86_64-softmmu/helper.o
cc1: warnings being treated as errors
target-i386/helper.c: In function 'cpu_inject_x86_mce':
target-i386/helper.c:1153: error: integer constant is too large for 'long' type

qemu_inject_x86_mce() accepts uint64_t as 3rd arg, so we have to add ULL
to fix the invocation.

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>

Comments

Jan Kiszka Feb. 5, 2011, 10:48 a.m. UTC | #1
On 2011-02-05 10:27, Michael Tokarev wrote:
> When compiling on i386 (32bit) compiler choles on this:
> 
>   CC    x86_64-softmmu/helper.o
> cc1: warnings being treated as errors
> target-i386/helper.c: In function 'cpu_inject_x86_mce':
> target-i386/helper.c:1153: error: integer constant is too large for 'long' type
> 
> qemu_inject_x86_mce() accepts uint64_t as 3rd arg, so we have to add ULL
> to fix the invocation.
> 
> Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
> 
> --- a/target-i386/helper.c
> +++ b/target-i386/helper.c
> @@ -1152,3 +1152,3 @@
>  
> -                qemu_inject_x86_mce(env, 1, 0xa000000000000000, 0, 0, 0);
> +                qemu_inject_x86_mce(env, 1, 0xa000000000000000ULL, 0, 0, 0);
>              }
> 

The original value is wrong. [1] should get merged into 0.14.

Jan

[1] http://article.gmane.org/gmane.comp.emulators.kvm.devel/67445
Michael Tokarev Feb. 8, 2011, 8:10 a.m. UTC | #2
http://article.gmane.org/gmane.comp.emulators.kvm.devel/67445 -- Ping?
qemu (0.14rc1) still can't be compiled on 32bit i386 host due to this.

/mjt

05.02.2011 13:48, Jan Kiszka wrote:
> On 2011-02-05 10:27, Michael Tokarev wrote:
>> When compiling on i386 (32bit) compiler choles on this:
>>
>>   CC    x86_64-softmmu/helper.o
>> cc1: warnings being treated as errors
>> target-i386/helper.c: In function 'cpu_inject_x86_mce':
>> target-i386/helper.c:1153: error: integer constant is too large for 'long' type
>>
>> qemu_inject_x86_mce() accepts uint64_t as 3rd arg, so we have to add ULL
>> to fix the invocation.
>>
>> Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
>>
>> --- a/target-i386/helper.c
>> +++ b/target-i386/helper.c
>> @@ -1152,3 +1152,3 @@
>>  
>> -                qemu_inject_x86_mce(env, 1, 0xa000000000000000, 0, 0, 0);
>> +                qemu_inject_x86_mce(env, 1, 0xa000000000000000ULL, 0, 0, 0);
>>              }
>>
> 
> The original value is wrong. [1] should get merged into 0.14.
> 
> Jan
> 
> [1] http://article.gmane.org/gmane.comp.emulators.kvm.devel/67445
>
diff mbox

Patch

--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1152,3 +1152,3 @@ 
 
-                qemu_inject_x86_mce(env, 1, 0xa000000000000000, 0, 0, 0);
+                qemu_inject_x86_mce(env, 1, 0xa000000000000000ULL, 0, 0, 0);
             }