Re: What does %P1 mean in gcc inline assembly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 05, 2016 at 11:37:21AM +0800, 张云 wrote:
> 
>     On Mar 4, 2016, at 11:59 PM, Dave Tian <dave.jing.tian@xxxxxxxxx> wrote:
> 
>     This ‘P’ is used to make gcc happy and work.
>     Without ‘P’, this inline would be interpreted as:
>     leal $-512(%esp), %eax
>     With ‘P’, this inline is the thing we really want:
>     leal -512(%esp), %eax
> 
>     Eventually, 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
> 
> Thank you for your detailed answer !
> 
> By the way, If someone have the problems alike, I suggest them to write some
> inline assembly and check the compiler’s assembly output.

Didn't get different outputs here, do you have updates?

-- 
Adam Lee
http://adam8157.info

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux