This is the mail archive of the gcc-bugs@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]

[Bug ada/48835] Porting GNAT to GNU/Linux/m68k


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835

--- Comment #5 from Thorsten Glaser <tg at mirbsd dot org> 2011-04-30 22:28:03 UTC ---
(In reply to comment #2)
> the caller expects the returned value in %a0.

Itâs even worse, __gnat_malloc contains:

        jsr malloc
        addq.l #4,%sp
        move.l %d0,-8(%fp)

Apparently, the Ada functions that are {Im,Ex}portâed all assume
they get their values in d0 not a0â

I wonder if this is a conceptual problem preventing Ada to work
with the m68k ELF ABI. How does vxworks/m68k (which, apparently,
has a GNAT port) manage it? (Even if we âfixâ the Export, the
Import of libc malloc will still failâ would this work if some
types were handled specially (like System.Address)? I wonder how
many third-party programmes would break on m68k when they have C
imports with uncleanly specified types thenâ)


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