This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/44288] [Extended inline asm] wrong assembly generation on IA32
- From: "dg dot recrutement31 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2010 12:05:11 -0000
- Subject: [Bug rtl-optimization/44288] [Extended inline asm] wrong assembly generation on IA32
- References: <bug-44288-19237@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from dg dot recrutement31 at gmail dot com 2010-05-27 12:05 -------
(In reply to comment #7)
> You are wrong. It is user's responsibility to choose correct constraints for
> the inline assembly, the compiler doesn't try to understand what the inline
> assembly is doing or even check its semantics, all it does is perform
> replacements in it (replacing %0, %1, %2 in this case).
> Not every constraint is suitable for every use in the assembly obviously,
> otherwise we wouldn't need multiple constraints.
> The "g" constraint allows a register, immediate or memory, all must be valid in
> the instruction and it is up to the compiler which one it chooses.
> "g" constraint is usable say for mov eax, %2; which can work well with
> registers, immediates or memory. But as you use [%2] instead, memory isn't
> valid, all that is valid is either a register or register + immediate or
> register + X*register2 + immediate (the usual i?86 addressing modes).
Thank a lot,
I fully understand my mistake.
Sorry for disturbance
Regards
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44288