This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Does gcc violate the ia64 ABI?


I will open a bug in gcc bugzilla when conversion is done. In the
meantime, I opened

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91056

The problem is gcc doesn't save/store gp across call. According to the
ia64 ABI, callee can change gp and gp must be saved/restore by caller
across calls. It is on page 5-2 in the Itanium Software Conventions
and Runtime Architecture Guide. Am I right?

# gcc -O2 -S x.c

H.J.
--x.c-
extern void foo ();
 
void
bar (void)
{
  foo ();
}
--x.s-
        .file   "x.c"
        .pred.safe_across_calls p1-p5,p16-p63
        .text
        .align 16
        .global bar#
        .proc bar#
bar:
        .prologue
        .body
        .bbb
        nop 0
        nop 0
        br.sptk.many foo#
        ;;
        break.f 0
        ;;
        .endp bar#
        .ident  "GCC: (GNU) 3.2.3 20030422 (Red Hat Linux 3.2.3-3)"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]