|object code vs. assembler code John_Burton@gec-epl.co.uk (1993-02-19)|
|Re: object code vs. assembler code firstname.lastname@example.org (1993-02-20)|
|Re: Object vs. Assembly from a compiler email@example.com (1993-02-22)|
|From:||firstname.lastname@example.org (Richard Gorton)|
|Keywords:||assembler, performance, comment|
|Date:||Mon, 22 Feb 1993 18:30:02 GMT|
> John_Burton@gec-epl.co.uk writes:
> Is there any good reason why many compilers produce assembly language as
> this seems to be a big performance hit with no gain by doing this. I can't
> see that producing obejct code is *that* much harder.
As the moderator notes:
[Mostly it's a matter of taste. Some Unix assemblers, particularly the
earlier ones, were very fast, so there needn't be a performance issue. -John]
Another point to consider is how much one trusts the native assembler.
Generating assembly code is just fine if the native assembler is stable,
and correct. But if the assembler is changing and/or buggy, then
generating object code may turn out to save you lots and lots of
bug-hunting headaches. Particularly if you don't have control of or
access to the assembler sources.
For example, some assemblers may not permit expressions involving
relocation, such as:
sethi %hi(_foo)+0x1000, %g2
ld [%g2 + %lo(_foo)+1000], %i2
but will take:
sethi %hi(_foo), %g2
or %g2, %lo(_foo), %g2
ld [%g2 + 1000], %i2
But a compiler generating object code is free to utilize the first form.
Richard Gorton Alpha AXP Migration Tools - Digital Equipment Corp.
[Is that an assembler limitation or a problem in the object format? -John]
Return to the
Search the comp.compilers archives again.