Given this stub:

int
main(int argc, char **argv)
{
        asm("\t.section .test\n"
            "\t.long %c0\n"
            "\t.previous\n"
            : : "i"(&__func__));
}

gcc and sun studio produce different output:

psg-solaris-01$ gcc -S x.c
/APP
                .section .test
        .long __func__.0
        .previous

/NO_APP

psg-solaris-01$ cc -S x.c
"x.c", line 7: warning: parameter in inline asm statement unused: %0

.L13:
        .section .test
        .long .L14+-74771841570308096
        .previous

If I understand correctly, the 'c' in %c0 is supposed to suppress the '$' when 
generating immediate data passed in to the asm().  Studio seems to hiccup on 
this.

Is this a bug, or an "unimplemented feature"?  Is there documentation anywhere 
for what syntax is supported by the studio implementation of asm()?

thanks
Mark



      
_______________________________________________
tools-compilers mailing list
[email protected]

Reply via email to