🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52272

What's with .umul and .div on Sparc?

#52272
From: Gordie Freedman
Date: Tue, 08 Dec 1992 19:22
38 lines
2512 bytes
(Using gcc 2.3.1 on a Sun 4 running Sunos 4.1.2)

I am doing incremental loading from within a program, and hence have my own loader
and linker. It works within the frameworks of out own OOPL based on C, and we are
using gcc to compile for the Sparc. Since it has to work across multiple platforms,
and since I link it together with Classes and methods found within our own framework,
I do the loading the hard way, interpreting the a.out format object files.

So far so good - however I noticed that integer multiply and divide code generate
calls to .umul and .div, and I have a few questions:

1) Why ".umul" rather than "_umul" like all other symbols are named (usually a
function foo() generates the string "_foo" in the symbol table, but in this case 
the symbols are prepended with a dot instead of underscore.

2) Is there some way for me to reference these functions (.umul and .div) from
within my program? I use a table for commonly referenced internal stuff so that
the loader can link new code to commonly called routines which are not accessable
any other way. I don't know how to find the address of either of these routines.

3) Can I get the compiler to inline the code for .umul and .div? I assume function
calls are used because the Sparc does not have integer multiply/divide (although
I noticed a similar thing with another compiler for 68k - which does have integer
multiply and divide - but this is off the point).

4) Is there documentation for these calls anywhere? In fact, is there documentation
for the a.out format as supported by gcc?

5) Are there any other "surprise" functions that might get called implicitly?
(we're not using C++, just C).

Also a related question - how much longer will gcc support a.out format? Will ELF
be supported in the near future?

Thanks in advance for any answers,

---
Gordie Freedman: gordie@kaleida.com Sigs are for kids
Technical Details
Message-ID: <1g2sluINN1n0@golden.kaleida.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!apple!kaleida.com!moon!gordie

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1e72aee9ace751a6,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-12-08 13:48:35 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!apple!kaleida.com!moon!gordie
From: gordie@kaleida.com (Gordie Freedman)
Newsgroups: gnu.gcc.help
Subject: What's with .umul and .div on Sparc?
Date: 8 Dec 1992 19:22:38 GMT
Organization: Happy hacker bait and tackle shop
Lines: 40
Distribution: world
Message-ID: <1g2sluINN1n0@golden.kaleida.com>
Reply-To: gordie@kaleida.com
NNTP-Posting-Host: moon.kaleida.com