Index: changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v retrieving revision 1.85 diff -u -p -r1.85 changes.html --- changes.html 16 Jan 2013 09:38:30 -0000 1.85 +++ changes.html 16 Jan 2013 20:40:40 -0000 @@ -390,6 +390,45 @@ B b(42); // OK
%r
for register operands in inline
+ assembler is supported. It will print the raw register number without the
+ register prefix 'r
':
+ + /* Return the most significant byte of 'val', a 64-bit value. */ + + unsigned char msb (long long val) + { + unsigned char c; + __asm__ ("mov %0, %r1+7" : "=r" (c) : "r" (val)); + return c; + }+ The inline assembler in this example will generate code like +
+ mov r24, 8+7+ provided
c
is allocated to R24
and
+ val
is allocated to
+ R8
…R15
. This works because
+ the GNU assembler accepts plain register numbers without register prefix.
+ + extern const __memx char foo; + const __memx void *pfoo = &foo;+ This requires at least Binutils 2.23. +
-mpreferred-stack-boundary=3
for the x86-64