On Sat, Aug 8, 2009 at 10:47 PM, Vladimir 'phcoder' Serbinenko<phco...@gmail.com> wrote: > On Sat, Aug 8, 2009 at 4:44 PM, Bean<bean12...@gmail.com> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel