On Mar 4, 2016, at 11:59 PM, Dave Tian <dave.jing.tian@gmail.com> wrote:This ‘P’ is used to make gcc happy and work.Without ‘P’, this inline would be interpreted as:leal $-512(%esp), %eaxWith ‘P’, this inline is the thing we really want:leal -512(%esp), %eaxEventually, my gcc 4.9.2 does not compile with ‘P’ is missing. I am not sure if this is still the case for newer gcc (5/6). But you get the point.-daveti
_______________________________________________On Mar 4, 2016, at 7:36 AM, 张云 <zyunone@163.com> wrote:_______________________________________________HiIn /arch/x86/boot/main.c (http://lxr.free-electrons.com/source/arch/x86/boot/main.c) ,In the function init_heap,asm("leal %P1(%%esp),%0" 122 : "=r" (stack_end) : "i" (-STACK_SIZE));What does the ‘%P1’ mean in the inline assembly above ?Thanks !
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies