🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #110

gcc for m68k on the HP 64902 system

#110
From: Thomas Hallgren
Date: Tue, 04 Aug 1992 19:25
42 lines
2397 bytes
I'm trying to create a gcc-port that will produce 68000 assembler suitable
for the HP 64902 development system. If anyone has already done this I
would be very pleased if this came to my knowledge.

None of the m68k based configurations supplied with the standard gcc-
package (I have the gcc-2.1) produces an assembler that even remotely
resembles the one that HP 64902 uses. I must say I am a bit suprised
since some of the books on 68000 assembler that I have read uses the
same syntax. As an example; they don't use neither a movel or mov.l
instruction but rather move.l, also neither jbne or jne exists, it's
called bne.

Have I missed something here? And if so, could someone please point me
in the right direction?

I have made some attempts to generate a correct assembler code since I
found it interesting to learn about the gcc internals. I've made it to
a state where I think that the generated code is correct. The assembler
compiles it without any errors. The generated code however contains a
lot of calls to runtime library routines and those calls are suitable
for the gnu library but not for the library that is supplied with the
HP 64902 system. Unfortunatly we have to mix code that is compiled
both with gcc and on the local system and we want to avoid having to
link both libraries.

The existing runtime library functions are special and they do not
follow the calling conventions of the 'normal' functions.  For example,
the function used when casting a float to a double, ftod (gcc __extendsfdf2),
assumes that the incoming value is stored in register d0 and returns the
result in d0,d1. It also destroys the contents of a0 and a1.

I do not fully understand all the features and possibilities of the
RTL templates and perhaps there is a simple solution. If you who reads
this know how to do it, please help me.

- thomas

-- 

                     Thomas Hallgren    +46 8 802320
                     Abalon AB
                     Stockholm, Sweden
Technical Details
Message-ID: <1992Aug4.192551.21311@abalon.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!seunet!abalon!thomas

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!seunet!abalon!thomas
From: thomas@abalon.se (Thomas Hallgren)
Subject: gcc for m68k on the HP 64902 system
Message-ID: <1992Aug4.192551.21311@abalon.se>
Organization: Abalon AB, Stockholm, Sweden
X-Newsreader: Tin 1.1 PL4
Date: Tue, 4 Aug 92 19:25:51 GMT
Lines: 42