Consider: short test(int X, int Y) { register char Yr asm("ch") = Y; __asm__("foo %0 %1 %2" : "=r"(X): "r"(X), "r"(Yr)); return X; }
This compiles to: test: movl 4(%esp), %edx movb 8(%esp), %cl #APP foo %eax %edx %cl #NO_APP cwtl ret I would expect CH, not CL, to be used. -Chris -- Summary: incorrect handling of x86 "H" registers in inline asm Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sabre at nondot dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26408