diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 19:19:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 19:19:35 +0000 |
commit | eec38304692556bedde517d299cc051d2d96fc01 (patch) | |
tree | 729e838a6d4e13dc0a7379bc9fafe85f9f13f5f8 | |
parent | 37685d2e686412d00bc9dfb47c1f093dda0b3e3c (diff) |
fixes from psm: use __asm__/__volatile__
-rw-r--r-- | libc/sysdeps/linux/arm/ioperm.c | 12 | ||||
-rw-r--r-- | libc/sysdeps/linux/arm/syscall.c | 32 |
2 files changed, 22 insertions, 22 deletions
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c index a0a4e7d1d..1ae2297cb 100644 --- a/libc/sysdeps/linux/arm/ioperm.c +++ b/libc/sysdeps/linux/arm/ioperm.c @@ -222,40 +222,40 @@ libc_hidden_def(ioperm) void outb(unsigned char b, unsigned long int port) { - *((volatile unsigned char *)(IO_ADDR (port))) = b; + *((__volatile__ unsigned char *)(IO_ADDR (port))) = b; } void outw(unsigned short b, unsigned long int port) { - *((volatile unsigned short *)(IO_ADDR (port))) = b; + *((__volatile__ unsigned short *)(IO_ADDR (port))) = b; } void outl(unsigned long b, unsigned long int port) { - *((volatile unsigned long *)(IO_ADDR (port))) = b; + *((__volatile__ unsigned long *)(IO_ADDR (port))) = b; } unsigned char inb (unsigned long int port) { - return *((volatile unsigned char *)(IO_ADDR (port))); + return *((__volatile__ unsigned char *)(IO_ADDR (port))); } unsigned short int inw(unsigned long int port) { - return *((volatile unsigned short *)(IO_ADDR (port))); + return *((__volatile__ unsigned short *)(IO_ADDR (port))); } unsigned long int inl(unsigned long int port) { - return *((volatile unsigned long *)(IO_ADDR (port))); + return *((__volatile__ unsigned long *)(IO_ADDR (port))); } diff --git a/libc/sysdeps/linux/arm/syscall.c b/libc/sysdeps/linux/arm/syscall.c index 33d9f5fea..60fbcf89b 100644 --- a/libc/sysdeps/linux/arm/syscall.c +++ b/libc/sysdeps/linux/arm/syscall.c @@ -15,14 +15,14 @@ long syscall(long sysnum, long a, long b, long c, long d, long e, long f) { #if !defined(__thumb__) - register long _r0 asm("r0")=(long)(sysnum); - register long _r6 asm("r6")=(long)(f); - register long _r5 asm("r5")=(long)(e); - register long _r4 asm("r4")=(long)(d); - register long _r3 asm("r3")=(long)(c); - register long _r2 asm("r2")=(long)(b); - register long _r1 asm("r1")=(long)(a); - asm volatile( + register long _r0 __asm__("r0")=(long)(sysnum); + register long _r6 __asm__("r6")=(long)(f); + register long _r5 __asm__("r5")=(long)(e); + register long _r4 __asm__("r4")=(long)(d); + register long _r3 __asm__("r3")=(long)(c); + register long _r2 __asm__("r2")=(long)(b); + register long _r1 __asm__("r1")=(long)(a); + __asm__ __volatile__( "swi %1" : "=r"(_r0) : "i"(__NR_syscall), "r"(_r0), "r"(_r1), @@ -30,14 +30,14 @@ long syscall(long sysnum, long a, long b, long c, long d, long e, long f) "r"(_r6) : "memory"); #else - register long _r7 asm("r7")=(long)(sysnum); - register long _r5 asm("r5")=(long)(f); - register long _r4 asm("r4")=(long)(e); - register long _r3 asm("r3")=(long)(d); - register long _r2 asm("r2")=(long)(c); - register long _r1 asm("r1")=(long)(b); - register long _r0 asm("r0")=(long)(a); - asm volatile( + register long _r7 __asm__("r7")=(long)(sysnum); + register long _r5 __asm__("r5")=(long)(f); + register long _r4 __asm__("r4")=(long)(e); + register long _r3 __asm__("r3")=(long)(d); + register long _r2 __asm__("r2")=(long)(c); + register long _r1 __asm__("r1")=(long)(b); + register long _r0 __asm__("r0")=(long)(a); + __asm__ __volatile__( "swi 0" : "=r"(_r0) : "r"(_r0), "r"(_r1), "r"(_r2), "r"(_r3), |