Re: Assembling Visual Studio generated listing files
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Fri, 07 Dec 2007 15:08:55 -0500
No, there is no reason for the compiler to "generate assembly code" (as in the text of
assembly code) internally. It doesn't. Very few compilers in history ever did. I only
know of two: the Bliss-11 compiler we did at CMU (because there were so many PDP-11 object
formats we couldn't generate all of the required ones, but the assembly code was the same
on all machines) and the original PDP-11 C compiler from Bell Labs. I'm sure there are
more, but we think of them as unusual compilers, not the typical way a compiler works.
Most compilers work by generating an object file; any assembly code listing is considered
to be "documentation" rather than "functional"; I hadn't even realized they were
compilable, but it would never have occurred to me that editing the generated assembly
code could make sense. The only system I knew that ever did this was the horrendous
kludge that built the PDP-11 Unix kernel, and even in 1975 we considered this to be a
really stupid idea. Not just a little bit stupid; truly outrageously stupid. It turns
out that when the compiler changed, the sed script broke and it took massive effort to
rewrite it to handle the new compiler output, which had slightly different register
assignments.
Key question: why do you need to edit the assembly code? If you explain the problem,
there is probably a better answer. You are asking how to implement a particular solution,
rather than asking how to solve a problem.
joe
On Fri, 7 Dec 2007 10:29:43 -0800 (PST), TahoeKid <rfdunn@xxxxxxxxxxx> wrote:
I found a knowledge base snippet from Microsoft and they claim not toJoseph M. Newcomer [MVP]
support assembling of the listing files.
I wonder how the compiler itself works internally. It seems to me it
needs to generate assembler internally,
so it should not be all that much effort for them to generate a 100%
compatible assembler file that can output
an exact oubinary.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Assembling Visual Studio generated listing files
- From: TahoeKid
- Re: Assembling Visual Studio generated listing files
- From: Geoff
- Re: Assembling Visual Studio generated listing files
- From: Joseph M . Newcomer
- Re: Assembling Visual Studio generated listing files
- From: TahoeKid
- Assembling Visual Studio generated listing files
- Prev by Date: Re: CStatusBar
- Next by Date: Re: Who is Jesus?
- Previous by thread: Re: Assembling Visual Studio generated listing files
- Next by thread: Re: Assembling Visual Studio generated listing files
- Index(es):
Relevant Pages
|