Re: __builtin_constant_p and inline assembly constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon Kagstrom writes:
 > 
 > #define _syscall1(type,name,atype,a) \
 > type name(atype a) { \
 > 	register unsigned long __v0 asm("$2"); \
 > 	__asm__ volatile (".set  push\n.set  noreorder\n"); \
 >         __emit_parameter(a); \
 > 	__asm__ volatile ( \
 > 	".short 0xffff\t#" #name "\n\t" \
 >         ".short %1\n" \
 > 	: "=&r" (__v0) \
 > 	: "i" (__NR_##name) ); \
 >         __asm__ volatile(".set\tpop\n"); \
 > 	return (type) __v0; \
 > }

I'm still trying to get my head around what the assembler will do when
gcc moves these asms around.

Put the ".set  push\n.set  noreorder\n" stuff *inside* the asms.  Please.  :-)

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux