This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/48835] Porting GNAT to GNU/Linux/m68k
- From: "tg at mirbsd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 30 Apr 2011 22:28:50 +0000
- Subject: [Bug ada/48835] Porting GNAT to GNU/Linux/m68k
- Auto-submitted: auto-generated
- References: <bug-48835-4@http.gcc.gnu.org/bugzilla/>
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â)