/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static inline Elf32_Addr
+static __inline__ Elf32_Addr
elf_machine_dynamic (void)
{
- register Elf32_Addr *got asm ("r6");
+ register Elf32_Addr *got __asm__("r6");
return *got;
}
/* Return the run-time load address of the shared object. */
-static inline Elf32_Addr
+static __inline__ Elf32_Addr
elf_machine_load_address (void)
{
- extern void __dl_start asm("_dl_start");
+ extern void __dl_start __asm__("_dl_start");
Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
Elf32_Addr pcrel_addr;
- asm (" lddpc %0, 2f\n"
+ __asm__(" lddpc %0, 2f\n"
"1: add %0, pc\n"
" rjmp 3f\n"
" .align 2\n"
* Currently, we don't use that tag, but we might in the future as
* this would reduce the startup time somewhat (although probably not by much).
*/
-static inline void
+static __inline__ void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
# define __bswap_16(x) (__extension__ __builtin_bswap_16(x))
#else
/* This is better than nothing. */
-static __inline unsigned short int
+static __inline__ unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
#if defined __GNUC__
# define __bswap_32(x) (__extension__ __builtin_bswap_32(x))
#else
-static __inline unsigned int
+static __inline__ unsigned int
__bswap_32 (unsigned int __bsx)
{
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ \
- register int _a1 asm ("r12"); \
- register int _scno asm("r8") = SYS_ify(name); \
+ register int _a1 __asm__("r12"); \
+ register int _scno __asm__("r8") = SYS_ify(name); \
LOAD_ARGS_##nr (args); \
- asm volatile ("scall /* syscall " #name " */" \
+ __asm__ __volatile__("scall /* syscall " #name " */" \
: "=r" (_a1) \
: "r"(_scno) ASM_ARGS_##nr \
: "cc", "memory"); \
LOAD_ARGS_0()
#define ASM_ARGS_1 ASM_ARGS_0, "r"(_a1)
#define LOAD_ARGS_2(a1, a2) \
- register int _a2 asm("r11") = (int)(a2); \
+ register int _a2 __asm__("r11") = (int)(a2); \
LOAD_ARGS_1(a1)
#define ASM_ARGS_2 ASM_ARGS_1, "r"(_a2)
#define LOAD_ARGS_3(a1, a2, a3) \
- register int _a3 asm("r10") = (int)(a3); \
+ register int _a3 __asm__("r10") = (int)(a3); \
LOAD_ARGS_2(a1, a2)
#define ASM_ARGS_3 ASM_ARGS_2, "r"(_a3)
#define LOAD_ARGS_4(a1, a2, a3, a4) \
- register int _a4 asm("r9") = (int)(a4); \
+ register int _a4 __asm__("r9") = (int)(a4); \
LOAD_ARGS_3(a1, a2, a3)
#define ASM_ARGS_4 ASM_ARGS_3, "r"(_a4)
#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
- register int _a5 asm("r5") = (int)(a5); \
+ register int _a5 __asm__("r5") = (int)(a5); \
LOAD_ARGS_4(a1, a2, a3, a4)
#define ASM_ARGS_5 ASM_ARGS_4, "r"(_a5)
#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
- register int _a6 asm("r3") = (int)(a6); \
+ register int _a6 __asm__("r3") = (int)(a6); \
LOAD_ARGS_5(a1, a2, a3, a4, a5)
#define ASM_ARGS_6 ASM_ARGS_5, "r"(_a6)