This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MS/CW-style inline assembly for GCC


Ian Lance Taylor wrote:

Richard Henderson <rth@redhat.com> writes:


Well, with this description it would seem that you could directly
convert CW asms into GCC asms, and thus you would have no impact
on anything outside the parser.  With that as a premise, I have no
objection (as a backend guy) to CW support being added to the FSF
compiler.


If it is really true that only the parser would have to change, then it seems to me that CW asm could be converted into gcc asm using a separate tool which simply rewrote the file. It would have to do simple C/C++ parsing, but I think not full parsing. Such a tool would be useful as a conversion aid, and with some specs hackery could also be invoked directly by the Darwin compiler.

You're not the first person to suggest the separate tool idea! It
would have to know types and decls well enough to come up with the
right constraint letters. Take a look at MacMAME sources to see
some hairy usage of CW inline asm; much of it is assembled from
combinations of macros.

Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]