about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2015-11-20 08:56:40 +0100
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-11-20 08:56:40 +0100
commit31cf39421bae23ffc7b6c6a229e14f8faa41608f (patch)
tree06c691d99784858f0ccd30133fed70f9362b91a5 /sysdeps/unix/sysv
parent9695cb3e6528d9f6f5c7c7f96bd6c94e5ba0e2c4 (diff)
downloadglibc-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/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/s390/brk.c10
-rw-r--r--sysdeps/unix/sysv/linux/s390/elision-trylock.c6
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h68
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h68
-rw-r--r--sysdeps/unix/sysv/linux/s390/sysconf.c54
7 files changed, 105 insertions, 105 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/brk.c b/sysdeps/unix/sysv/linux/s390/brk.c
index 519262969d..0e2511c27e 100644
--- a/sysdeps/unix/sysv/linux/s390/brk.c
+++ b/sysdeps/unix/sysv/linux/s390/brk.c
@@ -34,12 +34,12 @@ __brk (void *addr)
   void *newbrk;
 
   {
-    register void *__addr asm("2") = addr;
+    register void *__addr __asm__("2") = addr;
 
-    asm ("svc  %b1\n\t"		/* call sys_brk */
-	 : "=d" (__addr)
-	 : "I" (SYS_ify(brk)), "r" (__addr)
-	 : "cc", "memory" );
+    __asm__ ("svc  %b1\n\t"		/* call sys_brk */
+	     : "=d" (__addr)
+	     : "I" (SYS_ify(brk)), "r" (__addr)
+	     : "cc", "memory" );
     newbrk = __addr;
   }
   __curbrk = newbrk;
diff --git a/sysdeps/unix/sysv/linux/s390/elision-trylock.c b/sysdeps/unix/sysv/linux/s390/elision-trylock.c
index 5454b56903..093011e9f3 100644
--- a/sysdeps/unix/sysv/linux/s390/elision-trylock.c
+++ b/sysdeps/unix/sysv/linux/s390/elision-trylock.c
@@ -30,9 +30,9 @@
 int
 __lll_trylock_elision (int *futex, short *adapt_count)
 {
-  __asm__ volatile (".machinemode \"zarch_nohighgprs\"\n\t"
-		    ".machine \"all\""
-		    : : : "memory");
+  __asm__ __volatile__ (".machinemode \"zarch_nohighgprs\"\n\t"
+			".machine \"all\""
+			: : : "memory");
 
   /* Implement POSIX semantics by forbiding nesting elided trylocks.
      Sorry.  After the abort the code is re-executed
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c b/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c
index 11c6098106..070ccef770 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c
@@ -34,7 +34,7 @@
     {									\
       uintptr_t cur_sp;							\
       uintptr_t new_sp = env->__gregs[9];				\
-      __asm ("lr %0, %%r15" : "=r" (cur_sp));				\
+      __asm__ ("lr %0, %%r15" : "=r" (cur_sp));				\
       new_sp ^= guard;							\
       if (new_sp < cur_sp)						\
 	{								\
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index d29b68593d..8f4bc793a3 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -197,38 +197,38 @@
 #define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register int _ret asm("2");						      \
-    asm volatile (							      \
-    "svc    %b1\n\t"							      \
-    : "=d" (_ret)							      \
-    : "i" (__NR_##name) ASMFMT_##nr					      \
-    : "memory" );							      \
+    register int _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    %b1\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "i" (__NR_##name) ASMFMT_##nr		      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL_SVC0
 #define INTERNAL_SYSCALL_SVC0(name, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register unsigned long _nr asm("1") = (unsigned long)(__NR_##name);	      \
-    register int _ret asm("2");						      \
-    asm volatile (							      \
-    "svc    0\n\t"							      \
-    : "=d" (_ret)							      \
-    : "d" (_nr) ASMFMT_##nr						      \
-    : "memory" );							      \
+    register unsigned long _nr __asm__("1") = (unsigned long)(__NR_##name);   \
+    register int _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    0\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "d" (_nr) ASMFMT_##nr			      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL_NCS
 #define INTERNAL_SYSCALL_NCS(no, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register unsigned long _nr asm("1") = (unsigned long)(no);		      \
-    register int _ret asm("2");						      \
-    asm volatile (							      \
-    "svc    0\n\t"							      \
-    : "=d" (_ret)							      \
-    : "d" (_nr) ASMFMT_##nr						      \
-    : "memory" );							      \
+    register unsigned long _nr __asm__("1") = (unsigned long)(no);	      \
+    register int _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    0\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "d" (_nr) ASMFMT_##nr			      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL
@@ -246,22 +246,22 @@
 
 #define DECLARGS_0()
 #define DECLARGS_1(arg1) \
-	register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
+	register unsigned long gpr2 __asm__ ("2") = (unsigned long)(arg1);
 #define DECLARGS_2(arg1, arg2) \
 	DECLARGS_1(arg1) \
-	register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
+	register unsigned long gpr3 __asm__ ("3") = (unsigned long)(arg2);
 #define DECLARGS_3(arg1, arg2, arg3) \
 	DECLARGS_2(arg1, arg2) \
-	register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
+	register unsigned long gpr4 __asm__ ("4") = (unsigned long)(arg3);
 #define DECLARGS_4(arg1, arg2, arg3, arg4) \
 	DECLARGS_3(arg1, arg2, arg3) \
-	register unsigned long gpr5 asm ("5") = (unsigned long)(arg4);
+	register unsigned long gpr5 __asm__ ("5") = (unsigned long)(arg4);
 #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
 	DECLARGS_4(arg1, arg2, arg3, arg4) \
-	register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+	register unsigned long gpr6 __asm__ ("6") = (unsigned long)(arg5);
 #define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
 	DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
-	register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
+	register unsigned long gpr7 __asm__ ("7") = (unsigned long)(arg6);
 
 #define ASMFMT_0
 #define ASMFMT_1 , "0" (gpr2)
@@ -302,14 +302,14 @@
 #define INTERNAL_VSYSCALL_CALL(fn, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register long _ret asm("2");						      \
-    asm volatile (							      \
-    "lr 10,14\n\t"                                                           \
-    "basr 14,%1\n\t"							      \
-    "lr 14,10\n\t"                                                           \
-    : "=d" (_ret)							      \
-    : "d" (fn) ASMFMT_##nr						      \
-    : "cc", "memory", "0", "1", "10" CLOBBER_##nr);                          \
+    register long _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "lr 10,14\n\t"				      \
+			  "basr 14,%1\n\t"				      \
+			  "lr 14,10\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "d" (fn) ASMFMT_##nr			      \
+			  : "cc", "memory", "0", "1", "10" CLOBBER_##nr);     \
     _ret; })
 
 /* Pointer mangling support.  */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c b/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
index daf1f6b52e..6da8d55793 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
@@ -34,7 +34,7 @@
     {									\
       uintptr_t cur_sp;							\
       uintptr_t new_sp = env->__gregs[9];				\
-      __asm ("lgr %0, %%r15" : "=r" (cur_sp));				\
+      __asm__ ("lgr %0, %%r15" : "=r" (cur_sp));			\
       new_sp ^= guard;							\
       if (new_sp < cur_sp)						\
 	{								\
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index a373207dff..3492267526 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -203,38 +203,38 @@
 #define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register long _ret asm("2");					      \
-    asm volatile (							      \
-    "svc    %b1\n\t"							      \
-    : "=d" (_ret)							      \
-    : "i" (__NR_##name) ASMFMT_##nr					      \
-    : "memory" );							      \
+    register long _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    %b1\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "i" (__NR_##name) ASMFMT_##nr		      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL_SVC0
 #define INTERNAL_SYSCALL_SVC0(name, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register unsigned long _nr asm("1") = (unsigned long)(__NR_##name);	      \
-    register long _ret asm("2");					      \
-    asm volatile (							      \
-    "svc    0\n\t"							      \
-    : "=d" (_ret)							      \
-    : "d" (_nr) ASMFMT_##nr						      \
-    : "memory" );							      \
+    register unsigned long _nr __asm__("1") = (unsigned long)(__NR_##name);   \
+    register long _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    0\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "d" (_nr) ASMFMT_##nr			      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL_NCS
 #define INTERNAL_SYSCALL_NCS(no, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register unsigned long _nr asm("1") = (unsigned long)(no);		      \
-    register long _ret asm("2");					      \
-    asm volatile (							      \
-    "svc    0\n\t"							      \
-    : "=d" (_ret)							      \
-    : "d" (_nr) ASMFMT_##nr						      \
-    : "memory" );							      \
+    register unsigned long _nr __asm__("1") = (unsigned long)(no);	      \
+    register long _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "svc    0\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "d" (_nr) ASMFMT_##nr			      \
+			  : "memory" );					      \
     _ret; })
 
 #undef INTERNAL_SYSCALL
@@ -252,22 +252,22 @@
 
 #define DECLARGS_0()
 #define DECLARGS_1(arg1) \
-	register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
+	register unsigned long gpr2 __asm__ ("2") = (unsigned long)(arg1);
 #define DECLARGS_2(arg1, arg2) \
 	DECLARGS_1(arg1) \
-	register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
+	register unsigned long gpr3 __asm__ ("3") = (unsigned long)(arg2);
 #define DECLARGS_3(arg1, arg2, arg3) \
 	DECLARGS_2(arg1, arg2) \
-	register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
+	register unsigned long gpr4 __asm__ ("4") = (unsigned long)(arg3);
 #define DECLARGS_4(arg1, arg2, arg3, arg4) \
 	DECLARGS_3(arg1, arg2, arg3) \
-	register unsigned long gpr5 asm ("5") = (unsigned long)(arg4);
+	register unsigned long gpr5 __asm__ ("5") = (unsigned long)(arg4);
 #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
 	DECLARGS_4(arg1, arg2, arg3, arg4) \
-	register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+	register unsigned long gpr6 __asm__ ("6") = (unsigned long)(arg5);
 #define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
 	DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
-	register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
+	register unsigned long gpr7 __asm__ ("7") = (unsigned long)(arg6);
 
 #define ASMFMT_0
 #define ASMFMT_1 , "0" (gpr2)
@@ -308,14 +308,14 @@
 #define INTERNAL_VSYSCALL_CALL(fn, err, nr, args...)			      \
   ({									      \
     DECLARGS_##nr(args)							      \
-    register long _ret asm("2");					      \
-    asm volatile (							      \
-    "lgr 10,14\n\t"                                                          \
-    "basr 14,%1\n\t"							      \
-    "lgr 14,10\n\t"                                                          \
-    : "=d" (_ret)							      \
-    : "a" (fn) ASMFMT_##nr						      \
-    : "cc", "memory", "0", "1", "10" CLOBBER_##nr);                          \
+    register long _ret __asm__("2");					      \
+    __asm__ __volatile__ (						      \
+			  "lgr 10,14\n\t"				      \
+			  "basr 14,%1\n\t"				      \
+			  "lgr 14,10\n\t"				      \
+			  : "=d" (_ret)					      \
+			  : "a" (fn) ASMFMT_##nr			      \
+			  : "cc", "memory", "0", "1", "10" CLOBBER_##nr);     \
     _ret; })
 
 /* Pointer mangling support.  */
diff --git a/sysdeps/unix/sysv/linux/s390/sysconf.c b/sysdeps/unix/sysv/linux/s390/sysconf.c
index 7d61c507e0..452af24601 100644
--- a/sysdeps/unix/sysv/linux/s390/sysconf.c
+++ b/sysdeps/unix/sysv/linux/s390/sysconf.c
@@ -55,7 +55,7 @@ get_cache_info (int level, int attr, int type)
     {
       /* stfle (or zarch, high-gprs on s390-32) is not available.
 	 We are on an old machine. Return 256byte for LINESIZE for L1 d/i-cache,
-         otherwise 0.  */
+	 otherwise 0.  */
       if (level == 1 && attr == CACHE_ATTR_LINESIZE)
 	return 256L;
       else
@@ -64,7 +64,7 @@ get_cache_info (int level, int attr, int type)
 
   /* Store facility list and check for z10.
      (see ifunc-resolver for details)  */
-  register unsigned long reg0 asm("0") = 0;
+  register unsigned long reg0 __asm__("0") = 0;
 #ifdef __s390x__
   unsigned long stfle_bits;
 # define STFLE_Z10_MASK (1UL << (63 - 34))
@@ -72,19 +72,19 @@ get_cache_info (int level, int attr, int type)
   unsigned long long stfle_bits;
 # define STFLE_Z10_MASK (1ULL << (63 - 34))
 #endif /* !__s390x__ */
-  asm volatile(".machine push"        "\n\t"
-	       ".machinemode \"zarch_nohighgprs\"\n\t"
-	       ".machine \"z9-109\""  "\n\t"
-	       "stfle %0"             "\n\t"
-	       ".machine pop"         "\n"
-	       : "=QS" (stfle_bits), "+d" (reg0)
-	       : : "cc");
+  __asm__ __volatile__(".machine push"        "\n\t"
+		       ".machinemode \"zarch_nohighgprs\"\n\t"
+		       ".machine \"z9-109\""  "\n\t"
+		       "stfle %0"             "\n\t"
+		       ".machine pop"         "\n"
+		       : "=QS" (stfle_bits), "+d" (reg0)
+		       : : "cc");
 
   if (!(stfle_bits & STFLE_Z10_MASK))
     {
       /* We are at least on a z9 machine.
 	 Return 256byte for LINESIZE for L1 d/i-cache,
-         otherwise 0.  */
+	 otherwise 0.  */
       if (level == 1 && attr == CACHE_ATTR_LINESIZE)
 	return 256L;
       else
@@ -93,15 +93,15 @@ get_cache_info (int level, int attr, int type)
 
   /* Check cache topology, if cache is available at this level.  */
   arg = (CACHE_LEVEL_MAX - level) * 8;
-  asm volatile (".machine push\n\t"
-		".machine \"z10\"\n\t"
-		".machinemode \"zarch_nohighgprs\"\n\t"
-		"ecag %0,%%r0,0\n\t"   /* returns 64bit unsigned integer.  */
-		"srlg %0,%0,0(%1)\n\t" /* right align 8bit cache info field.  */
-		".machine pop"
-		: "=&d" (val)
-		: "a" (arg)
-		);
+  __asm__ __volatile__ (".machine push\n\t"
+			".machine \"z10\"\n\t"
+			".machinemode \"zarch_nohighgprs\"\n\t"
+			"ecag %0,%%r0,0\n\t"   /* returns 64bit unsigned integer.  */
+			"srlg %0,%0,0(%1)\n\t" /* right align 8bit cache info field.  */
+			".machine pop"
+			: "=&d" (val)
+			: "a" (arg)
+			);
   val &= 0xCUL; /* Extract cache scope information from cache topology summary.
 		   (bits 4-5 of 8bit-field; 00 means cache does not exist).  */
   if (val == 0)
@@ -109,14 +109,14 @@ get_cache_info (int level, int attr, int type)
 
   /* Get cache information for level, attribute and type.  */
   cmd = (attr << 4) | ((level - 1) << 1) | type;
-  asm volatile (".machine push\n\t"
-		".machine \"z10\"\n\t"
-		".machinemode \"zarch_nohighgprs\"\n\t"
-		"ecag %0,%%r0,0(%1)\n\t"
-		".machine pop"
-		: "=d" (val)
-		: "a" (cmd)
-		);
+  __asm__ __volatile__ (".machine push\n\t"
+			".machine \"z10\"\n\t"
+			".machinemode \"zarch_nohighgprs\"\n\t"
+			"ecag %0,%%r0,0(%1)\n\t"
+			".machine pop"
+			: "=d" (val)
+			: "a" (cmd)
+			);
   return val;
 }