[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Report: compil error on OSX for target=i386
From: |
Bean |
Subject: |
Re: Report: compil error on OSX for target=i386 |
Date: |
Sat, 8 Aug 2009 22:53:56 +0800 |
On Sat, Aug 8, 2009 at 10:47 PM, Vladimir 'phcoder'
Serbinenko<address@hidden> wrote:
> On Sat, Aug 8, 2009 at 4:44 PM, Bean<address@hidden> wrote:
>> Hi,
>>
>> I also encounter this problem with apple gcc 4.0, the fix is to replace:
>>
>> asm volatile ("jmp *%2" : : "b" (0), "S" (real_mode_mem), "g"
>> (params->code32_start));
>>
>> With:
>> asm volatile ("movl %0, %%ecx" : : "m" (params->code32_start));
>> asm volatile ("movl %0, %%esi" : : "m" (real_mode_mem));
>>
>> asm volatile ("xorl %%ebx, %%ebx" : : );
>> asm volatile ("jmp *%%ecx" : : );
> This code has absolutely no guaranty to work since C can change
> registers between asm parts. In long term I was planning to replace
> this code with use of relocator framework
Hi,
I've examined the generated code with otool and it doesn't insert
extra instruction. Anyway, it would be nice if you can make it more
fail proof.
--
Bean