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


On May 4, 2004, at 14:38, Richard Henderson wrote:
That's what happens with gcc asms, yes.  It was much less clear
what to do about msvc asms, mostly due to lack of registers, the
pressure added by x86 elf -fpic code, and (perhaps unreasonable)
customer expectation that it "just work".

I presume you're also parsing the asm opcode to know what register
class is needed at a particular point?

I think that is the major improvement that could be made to GCC asms. Based on the assembly, the compiler determines required constraints. If the constraints cannot be determined or cannot be satisfied, the compiler should give a diagnostic.

This is not trivial of course, but I think the compiler could in
the majority of situations determine the constraints more
accurately than GCC users can. Over 90% of the GCC asms I see
have wrong constraints.

-Geert


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