diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2015-11-20 08:56:40 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-11-20 08:56:40 +0100 |
commit | 31cf39421bae23ffc7b6c6a229e14f8faa41608f (patch) | |
tree | 06c691d99784858f0ccd30133fed70f9362b91a5 /sysdeps/s390/s390-32 | |
parent | 9695cb3e6528d9f6f5c7c7f96bd6c94e5ba0e2c4 (diff) | |
download | glibc-31cf39421bae23ffc7b6c6a229e14f8faa41608f.tar.gz glibc-31cf39421bae23ffc7b6c6a229e14f8faa41608f.tar.xz glibc-31cf39421bae23ffc7b6c6a229e14f8faa41608f.zip |
S390: Use __asm__ instead of asm.
* sysdeps/s390/fpu/bits/mathinline.h: Use __asm__ [__volatile__] instead of asm [volatile]. * sysdeps/s390/abort-instr.h: Likewise. * sysdeps/s390/atomic-machine.h: Likewise. * sysdeps/s390/bits/string.h: Likewise. * sysdeps/s390/dl-tls.h: Likewise. * sysdeps/s390/fpu/e_sqrt.c: Likewise. * sysdeps/s390/fpu/e_sqrtf.c: Likewise. * sysdeps/s390/fpu/e_sqrtl.c: Likewise. * sysdeps/s390/fpu/fesetround.c: Likewise. * sysdeps/s390/fpu/fpu_control.h: Likewise. * sysdeps/s390/fpu/s_fma.c: Likewise. * sysdeps/s390/fpu/s_fmaf.c: Likewise. * sysdeps/s390/memusage.h: Likewise. * sysdeps/s390/multiarch/ifunc-resolve.h: Likewise. * sysdeps/s390/nptl/pthread_spin_lock.c: Likewise. * sysdeps/s390/nptl/pthread_spin_trylock.c: Likewise. * sysdeps/s390/nptl/pthread_spin_unlock.c: Likewise. * sysdeps/s390/nptl/tls.h: Likewise. * sysdeps/s390/s390-32/__longjmp.c: Likewise. * sysdeps/s390/s390-32/backtrace.c: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-32/stackguard-macros.h: Likewise. * sysdeps/s390/s390-32/tls-macros.h: Likewise. * sysdeps/s390/s390-64/__longjmp.c: Likewise. * sysdeps/s390/s390-64/backtrace.c: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-64/stackguard-macros.h: Likewise. * sysdeps/s390/s390-64/tls-macros.h: Likewise. * sysdeps/s390/s390-64/utf16-utf32-z9.c: Likewise. * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise. * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise. * sysdeps/unix/sysv/linux/s390/brk.c: Likewise. * sysdeps/unix/sysv/linux/s390/elision-trylock.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/sysconf.c: Likewise.
Diffstat (limited to 'sysdeps/s390/s390-32')
-rw-r--r-- | sysdeps/s390/s390-32/__longjmp.c | 48 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/backtrace.c | 2 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/dl-machine.h | 26 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/multiarch/memcmp.c | 2 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/stackguard-macros.h | 16 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/tls-macros.h | 138 |
6 files changed, 116 insertions, 116 deletions
diff --git a/sysdeps/s390/s390-32/__longjmp.c b/sysdeps/s390/s390-32/__longjmp.c index b253934083..e9fe7e23e1 100644 --- a/sysdeps/s390/s390-32/__longjmp.c +++ b/sysdeps/s390/s390-32/__longjmp.c @@ -37,46 +37,46 @@ __longjmp (__jmp_buf env, int val) #elif defined CHECK_SP CHECK_SP (env, 0); #endif - register int r2 __asm ("%r2") = val == 0 ? 1 : val; + register int r2 __asm__ ("%r2") = val == 0 ? 1 : val; #ifdef PTR_DEMANGLE - register uintptr_t r3 __asm ("%r3") = guard; - register void *r1 __asm ("%r1") = (void *) env; + register uintptr_t r3 __asm__ ("%r3") = guard; + register void *r1 __asm__ ("%r1") = (void *) env; #endif /* Restore registers and jump back. */ - asm volatile ( + __asm__ __volatile__ ( /* longjmp probe expects longjmp first argument, second argument and target address. */ #ifdef PTR_DEMANGLE - "lm %%r4,%%r5,32(%1)\n\t" - "xr %%r4,%2\n\t" - "xr %%r5,%2\n\t" - LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r4) + "lm %%r4,%%r5,32(%1)\n\t" + "xr %%r4,%2\n\t" + "xr %%r5,%2\n\t" + LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r4) #else - LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r14) + LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r14) #endif - /* restore fpregs */ - "ld %%f6,48(%1)\n\t" - "ld %%f4,40(%1)\n\t" + /* restore fpregs */ + "ld %%f6,48(%1)\n\t" + "ld %%f4,40(%1)\n\t" - /* restore gregs and return to jmp_buf target */ + /* restore gregs and return to jmp_buf target */ #ifdef PTR_DEMANGLE - "lm %%r6,%%r13,0(%1)\n\t" - "lr %%r15,%%r5\n\t" - LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r4) - "br %%r4" + "lm %%r6,%%r13,0(%1)\n\t" + "lr %%r15,%%r5\n\t" + LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r4) + "br %%r4" #else - "lm %%r6,%%r15,0(%1)\n\t" - LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r14) - "br %%r14" + "lm %%r6,%%r15,0(%1)\n\t" + LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r14) + "br %%r14" #endif - : : "r" (r2), + : : "r" (r2), #ifdef PTR_DEMANGLE - "r" (r1), "r" (r3) + "r" (r1), "r" (r3) #else - "a" (env) + "a" (env) #endif - ); + ); /* Avoid `volatile function does return' warnings. */ for (;;); diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c index 5b5738cae7..3531d31d73 100644 --- a/sysdeps/s390/s390-32/backtrace.c +++ b/sysdeps/s390/s390-32/backtrace.c @@ -85,7 +85,7 @@ __backchain_backtrace (void **array, int size) struct layout *stack; int cnt = 0; - asm ("LR %0,%%r15" : "=d" (stack) ); + __asm__ ("LR %0,%%r15" : "=d" (stack) ); /* We skip the call to this function, it makes no sense to record it. */ stack = (struct layout *) stack->back_chain; while (cnt < size) diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h index 119e7b568c..d2680a451c 100644 --- a/sysdeps/s390/s390-32/dl-machine.h +++ b/sysdeps/s390/s390-32/dl-machine.h @@ -55,10 +55,10 @@ elf_machine_dynamic (void) { register Elf32_Addr *got; - asm( " bras %0,2f\n" - "1: .long _GLOBAL_OFFSET_TABLE_-1b\n" - "2: al %0,0(%0)" - : "=&a" (got) : : "0" ); + __asm__( " bras %0,2f\n" + "1: .long _GLOBAL_OFFSET_TABLE_-1b\n" + "2: al %0,0(%0)" + : "=&a" (got) : : "0" ); return *got; } @@ -70,14 +70,14 @@ elf_machine_load_address (void) { Elf32_Addr addr; - asm( " bras 1,2f\n" - "1: .long _GLOBAL_OFFSET_TABLE_ - 1b\n" - " .long (_dl_start - 1b - 0x80000000) & 0x00000000ffffffff\n" - "2: l %0,4(1)\n" - " ar %0,1\n" - " al 1,0(1)\n" - " sl %0,_dl_start@GOT(1)" - : "=&d" (addr) : : "1" ); + __asm__( " bras 1,2f\n" + "1: .long _GLOBAL_OFFSET_TABLE_ - 1b\n" + " .long (_dl_start - 1b - 0x80000000) & 0x00000000ffffffff\n" + "2: l %0,4(1)\n" + " ar %0,1\n" + " al 1,0(1)\n" + " sl %0,_dl_start@GOT(1)" + : "=&d" (addr) : : "1" ); return addr; } @@ -141,7 +141,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) The C function `_dl_start' is the real entry point; its return value is the user program's entry point. */ -#define RTLD_START asm ("\n\ +#define RTLD_START __asm__ ("\n\ .text\n\ .align 4\n\ .globl _start\n\ diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.c b/sysdeps/s390/s390-32/multiarch/memcmp.c index a3607e4472..d861e0b045 100644 --- a/sysdeps/s390/s390-32/multiarch/memcmp.c +++ b/sysdeps/s390/s390-32/multiarch/memcmp.c @@ -20,5 +20,5 @@ # include <ifunc-resolve.h> s390_libc_ifunc (memcmp) -asm(".weak bcmp ; bcmp = memcmp"); +__asm__(".weak bcmp ; bcmp = memcmp"); #endif diff --git a/sysdeps/s390/s390-32/stackguard-macros.h b/sysdeps/s390/s390-32/stackguard-macros.h index 449e8d488f..46109744ed 100644 --- a/sysdeps/s390/s390-32/stackguard-macros.h +++ b/sysdeps/s390/s390-32/stackguard-macros.h @@ -1,15 +1,15 @@ #include <stdint.h> #define STACK_CHK_GUARD \ - ({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; }) + ({ uintptr_t x; __asm__ ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; }) /* On s390/s390x there is no unique pointer guard, instead we use the same value as the stack guard. */ #define POINTER_CHK_GUARD \ - ({ \ - uintptr_t x; \ - asm ("ear %0,%%a0; l %0,%1(%0)" \ - : "=a" (x) \ - : "i" (offsetof (tcbhead_t, stack_guard))); \ - x; \ - }) + ({ \ + uintptr_t x; \ + __asm__ ("ear %0,%%a0; l %0,%1(%0)" \ + : "=a" (x) \ + : "i" (offsetof (tcbhead_t, stack_guard))); \ + x; \ + }) diff --git a/sysdeps/s390/s390-32/tls-macros.h b/sysdeps/s390/s390-32/tls-macros.h index a592d81585..09b42aa37a 100644 --- a/sysdeps/s390/s390-32/tls-macros.h +++ b/sysdeps/s390/s390-32/tls-macros.h @@ -1,102 +1,102 @@ #define TLS_LE(x) \ ({ unsigned long __offset; \ - asm ("bras %0,1f\n" \ - "0:\t.long " #x "@ntpoff\n" \ - "1:\tl %0,0(%0)" \ - : "=a" (__offset) : : "cc" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long " #x "@ntpoff\n" \ + "1:\tl %0,0(%0)" \ + : "=a" (__offset) : : "cc" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #ifdef PIC # define TLS_IE(x) \ ({ unsigned long __offset, __got; \ - asm ("bras %0,1f\n" \ - "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ - ".long " #x "@gotntpoff\n" \ - "1:\tl %1,0(%0)\n\t" \ - "la %1,0(%1,%0)\n\t" \ - "l %0,4(%0)\n\t" \ - "l %0,0(%0,%1):tls_load:" #x "\n" \ - : "=&a" (__offset), "=&a" (__got) : : "cc" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ + ".long " #x "@gotntpoff\n" \ + "1:\tl %1,0(%0)\n\t" \ + "la %1,0(%1,%0)\n\t" \ + "l %0,4(%0)\n\t" \ + "l %0,0(%0,%1):tls_load:" #x "\n" \ + : "=&a" (__offset), "=&a" (__got) : : "cc" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #else # define TLS_IE(x) \ ({ unsigned long __offset; \ - asm ("bras %0,1f\n" \ - "0:\t.long " #x "@indntpoff\n" \ - "1:\t l %0,0(%0)\n\t" \ - "l %0,0(%0):tls_load:" #x \ - : "=&a" (__offset) : : "cc" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long " #x "@indntpoff\n" \ + "1:\t l %0,0(%0)\n\t" \ + "l %0,0(%0):tls_load:" #x \ + : "=&a" (__offset) : : "cc" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #endif #ifdef PIC # define TLS_LD(x) \ ({ unsigned long __offset, __save12; \ - asm ("bras %0,1f\n" \ - "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ - ".long __tls_get_offset@plt-0b\n\t" \ - ".long " #x "@tlsldm\n\t" \ - ".long " #x "@dtpoff\n" \ - "1:\tlr %1,%%r12\n\t" \ - "l %%r12,0(%0)\n\t" \ - "la %%r12,0(%%r12,%0)\n\t" \ - "l %%r1,4(%0)\n\t" \ - "l %%r2,8(%0)\n\t" \ - "bas %%r14,0(%%r1,%0):tls_ldcall:" #x "\n\t" \ - "l %0,12(%0)\n\t" \ - "alr %0,%%r2\n\t" \ - "lr %%r12,%1" \ - : "=&a" (__offset), "=&a" (__save12) \ - : : "cc", "0", "1", "2", "3", "4", "5" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ + ".long __tls_get_offset@plt-0b\n\t" \ + ".long " #x "@tlsldm\n\t" \ + ".long " #x "@dtpoff\n" \ + "1:\tlr %1,%%r12\n\t" \ + "l %%r12,0(%0)\n\t" \ + "la %%r12,0(%%r12,%0)\n\t" \ + "l %%r1,4(%0)\n\t" \ + "l %%r2,8(%0)\n\t" \ + "bas %%r14,0(%%r1,%0):tls_ldcall:" #x "\n\t" \ + "l %0,12(%0)\n\t" \ + "alr %0,%%r2\n\t" \ + "lr %%r12,%1" \ + : "=&a" (__offset), "=&a" (__save12) \ + : : "cc", "0", "1", "2", "3", "4", "5" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #else # define TLS_LD(x) \ ({ unsigned long __offset; \ - asm ("bras %0,1f\n" \ - "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \ - ".long __tls_get_offset@plt\n\t" \ - ".long " #x "@tlsldm\n\t" \ - ".long " #x "@dtpoff\n" \ - "1:\tl %%r12,0(%0)\n\t" \ - "l %%r1,4(%0)\n\t" \ - "l %%r2,8(%0)\n\t" \ - "bas %%r14,0(%%r1):tls_ldcall:" #x "\n\t" \ - "l %0,12(%0)\n\t" \ - "alr %0,%%r2" \ - : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \ + ".long __tls_get_offset@plt\n\t" \ + ".long " #x "@tlsldm\n\t" \ + ".long " #x "@dtpoff\n" \ + "1:\tl %%r12,0(%0)\n\t" \ + "l %%r1,4(%0)\n\t" \ + "l %%r2,8(%0)\n\t" \ + "bas %%r14,0(%%r1):tls_ldcall:" #x "\n\t" \ + "l %0,12(%0)\n\t" \ + "alr %0,%%r2" \ + : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #endif #ifdef PIC # define TLS_GD(x) \ ({ unsigned long __offset, __save12; \ - asm ("bras %0,1f\n" \ - "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ - ".long __tls_get_offset@plt-0b\n\t" \ - ".long " #x "@tlsgd\n" \ - "1:\tlr %1,%%r12\n\t" \ - "l %%r12,0(%0)\n\t" \ - "la %%r12,0(%%r12,%0)\n\t" \ - "l %%r1,4(%0)\n\t" \ - "l %%r2,8(%0)\n\t" \ - "bas %%r14,0(%%r1,%0):tls_gdcall:" #x "\n\t" \ - "lr %0,%%r2\n\t" \ - "lr %%r12,%1" \ - : "=&a" (__offset), "=&a" (__save12) \ - : : "cc", "0", "1", "2", "3", "4", "5" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \ + ".long __tls_get_offset@plt-0b\n\t" \ + ".long " #x "@tlsgd\n" \ + "1:\tlr %1,%%r12\n\t" \ + "l %%r12,0(%0)\n\t" \ + "la %%r12,0(%%r12,%0)\n\t" \ + "l %%r1,4(%0)\n\t" \ + "l %%r2,8(%0)\n\t" \ + "bas %%r14,0(%%r1,%0):tls_gdcall:" #x "\n\t" \ + "lr %0,%%r2\n\t" \ + "lr %%r12,%1" \ + : "=&a" (__offset), "=&a" (__save12) \ + : : "cc", "0", "1", "2", "3", "4", "5" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #else # define TLS_GD(x) \ ({ unsigned long __offset; \ - asm ("bras %0,1f\n" \ - "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \ - ".long __tls_get_offset@plt\n\t" \ - ".long " #x "@tlsgd\n" \ - "1:\tl %%r12,0(%0)\n\t" \ - "l %%r1,4(%0)\n\t" \ - "l %%r2,8(%0)\n\t" \ - "bas %%r14,0(%%r1):tls_gdcall:" #x "\n\t" \ - "lr %0,%%r2" \ - : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \ + __asm__ ("bras %0,1f\n" \ + "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \ + ".long __tls_get_offset@plt\n\t" \ + ".long " #x "@tlsgd\n" \ + "1:\tl %%r12,0(%0)\n\t" \ + "l %%r1,4(%0)\n\t" \ + "l %%r2,8(%0)\n\t" \ + "bas %%r14,0(%%r1):tls_gdcall:" #x "\n\t" \ + "lr %0,%%r2" \ + : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #endif |