[Bug inline-asm/37621] New: Missing documentation for x86 inline assembler modifiers

n dot pipenbrinck at cubic dot org gcc-bugzilla@gcc.gnu.org
Tue Sep 23 12:14:00 GMT 2008


I came across the following modifiers for inline assembler:

 asm ("rorw $8,  %w0" : "=q" (y) : "0" (x));

 asm ("xchg %b0, %h0" : "=q" (y) : "0" (x));


They work very well. No bug in the compiler itself, but I haven't found
anything about them in the online documentation. 

Note: The %w0, %b0 and %h0 modifiers allows us to access thesub-registers of a
32 bit register. E.g. if %0 is EAX, %w0 becomes AX, %b0 becomes AL and %h0
becomes AH.


-- 
           Summary: Missing documentation for x86 inline assembler modifiers
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: n dot pipenbrinck at cubic dot org
  GCC host triplet: x86
GCC target triplet: x86


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37621



More information about the Gcc-bugs mailing list