aarch64 inline asm / -fPIC problem

Andrew Haley aph@redhat.com
Sat Aug 29 15:45:08 GMT 2020

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>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the Gcc-help mailing list