From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 727 invoked by alias); 30 Apr 2011 22:29:05 -0000 Received: (qmail 718 invoked by uid 22791); 30 Apr 2011 22:29:04 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 Apr 2011 22:28:50 +0000 From: "tg at mirbsd dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/48835] Porting GNAT to GNU/Linux/m68k X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tg at mirbsd dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Sat, 30 Apr 2011 22:29:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg03234.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48835 --- Comment #5 from Thorsten Glaser 2011-04-30 22:28= :03 UTC --- (In reply to comment #2) > the caller expects the returned value in %a0. It=E2=80=99s 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=E2=80=99ed all assume they get their values in d0 not a0=E2=80=A6 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 =E2=80=9Cfix=E2=80=9D the Export, t= he Import of libc malloc will still fail=E2=80=A6 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=E2=80=A6)