Re: aarch64 inline asm / -fPIC problem

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

 



On 27/08/2020 22:23, Joe Buehler via Gcc-help wrote:

    temp.c: In function  main :
    temp.c:4:2: warning: asm operand 0 probably doesn t match constraints
      __asm__ volatile(".8byte %0\n\t" : : "i" ("message %s\n"));
      ^~~~~~~
    temp.c:4:2: error: impossible constraint in  asm

I'd use the "S" constraint.

> I am unable to code something similar manually using inline asm because
> the string is a format string containing % characters, which inline asm
> will of course try to interpret. (Does gcc provide anything to escape %
> chars in a literal string?)

"%%"

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux