about summary refs log tree commit diff
path: root/sysdeps/s390
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/s390-32/sysdep.h29
-rw-r--r--sysdeps/s390/s390-64/initfini.c192
-rw-r--r--sysdeps/s390/s390-64/sysdep.h18
3 files changed, 116 insertions, 123 deletions
diff --git a/sysdeps/s390/s390-32/sysdep.h b/sysdeps/s390/s390-32/sysdep.h
index 316fc4c848..a9dac44307 100644
--- a/sysdeps/s390/s390-32/sysdep.h
+++ b/sysdeps/s390/s390-32/sysdep.h
@@ -82,13 +82,16 @@
 #define mcount		_mcount
 #endif
 
-#define	PSEUDO(name, syscall_name, args)				      \
-lose: SYSCALL_PIC_SETUP							      \
-  JUMPTARGET(syscall_error)						      \
-  .globl syscall_error;							      \
-  ENTRY (name)								      \
-  DO_CALL (syscall_name, args);						      \
-  jm lose
+#define	PSEUDO(name, syscall_name, args) \
+lose: SYSCALL_PIC_SETUP				\
+    basr %r1,0;					\
+0:  al %r1,1f-0b(%r1);				\
+    br %r1;					\
+1:  .long JUMPTARGET(syscall_error) - 0b;	\
+    .globl syscall_error;			\
+    ENTRY (name)				\
+    DO_CALL (syscall_name, args);		\
+    jm lose
 
 #undef	PSEUDO_END
 #define	PSEUDO_END(name)						      \
@@ -96,21 +99,13 @@ lose: SYSCALL_PIC_SETUP							      \
 
 #undef JUMPTARGET
 #ifdef PIC
-#define JUMPTARGET(name)  \
-    basr %r1,0            \
-0:  al   %r1,1f-0b(0,%r1) \
-    br   %r1              \
-1:  .long name##@PLT - 0b
+#define JUMPTARGET(name)	name##@PLT
 #define SYSCALL_PIC_SETUP             \
     bras  %r12,1f                     \
 0:  .long _GLOBAL_OFFSET_TABLE_-0b    \
 1:  al    %r12,0(%r12)
 #else
-#define JUMPTARGET(name)   \
-    basr  %r1,0            \
-0:  al    %r1,1f-0b(0,%r1) \
-    br    %r1              \
-1:  .long name - 0b
+#define JUMPTARGET(name)   	name
 #define SYSCALL_PIC_SETUP	/* Nothing.  */
 #endif
 
diff --git a/sysdeps/s390/s390-64/initfini.c b/sysdeps/s390/s390-64/initfini.c
index 50f9b02047..2a40253add 100644
--- a/sysdeps/s390/s390-64/initfini.c
+++ b/sysdeps/s390/s390-64/initfini.c
@@ -28,100 +28,100 @@
    * crtn.s puts the corresponding function epilogues
    in the .init and .fini sections. */
 
-__asm__ ("
-
-#include \"defs.h\"
-
-/*@HEADER_ENDS*/
-
-/*@TESTS_BEGIN*/
-
-/*@TESTS_END*/
-
-/*@_init_PROLOG_BEGINS*/
-
-	.section .init
-#NO_APP
-	.align 4
-.globl _init
-	.type	 _init,@function
-_init:
-#	leaf function           0
-#	automatics              0
-#	outgoing args           0
-#	need frame pointer      0
-#	call alloca             0
-#	has varargs             0
-#	incoming args (stack)   0
-#	function length         36
-	STMG	6,15,48(15)
-	LGR	1,15
-	AGHI	15,-160
-	STG	1,0(15)
-        LARL    12,_GLOBAL_OFFSET_TABLE_
-	LARL    1,__gmon_start__@GOTENT
-	LG      1,0(1)
-	LTGR    1,1
-	JE      .L22
-	BASR    14,1
-.L22:
-#APP
-	.align 4,0x07
-	END_INIT
-
-/*@_init_PROLOG_ENDS*/
-
-/*@_init_EPILOG_BEGINS*/
-	.align 4
-	.section .init
-#NO_APP
-	.align 4
-	LG	4,272(15)
-	LMG	6,15,208(15)
-	BR	4
-#APP
-	END_INIT
-
-/*@_init_EPILOG_ENDS*/
-
-/*@_fini_PROLOG_BEGINS*/
-	.section .fini
-#NO_APP
-	.align 4
-.globl _fini
-	.type	 _fini,@function
-_fini:
-#	leaf function           0
-#	automatics              0
-#	outgoing args           0
-#	need frame pointer      0
-#	call alloca             0
-#	has varargs             0
-#	incoming args (stack)   0
-#	function length         30
-	STMG	6,15,48(15)
-	LGR	1,15
-	AGHI	15,-160
-	STG	1,0(15)
-	LARL	12,_GLOBAL_OFFSET_TABLE_
-#APP
-	.align 4,0x07
-	END_FINI
-
-/*@_fini_PROLOG_ENDS*/
-
-/*@_fini_EPILOG_BEGINS*/
-	.align 4
-	.section .fini
-#NO_APP
-	.align 4
-	LG	4,272(15)
-	LMG	6,15,208(15)
-	BR	4
-#APP
-	END_FINI
-
-/*@_fini_EPILOG_ENDS*/
-
-/*@TRAILER_BEGINS*/
+__asm__ ("\
+\n\
+#include \"defs.h\"\n\
+\n\
+/*@HEADER_ENDS*/\n\
+\n\
+/*@TESTS_BEGIN*/\n\
+\n\
+/*@TESTS_END*/\n\
+\n\
+/*@_init_PROLOG_BEGINS*/\n\
+\n\
+	.section .init\n\
+#NO_APP\n\
+	.align 4\n\
+.globl _init\n\
+	.type	 _init,@function\n\
+_init:\n\
+#	leaf function           0\n\
+#	automatics              0\n\
+#	outgoing args           0\n\
+#	need frame pointer      0\n\
+#	call alloca             0\n\
+#	has varargs             0\n\
+#	incoming args (stack)   0\n\
+#	function length         36\n\
+	STMG	6,15,48(15)\n\
+	LGR	1,15\n\
+	AGHI	15,-160\n\
+	STG	1,0(15)\n\
+        LARL    12,_GLOBAL_OFFSET_TABLE_\n\
+	LARL    1,__gmon_start__@GOTENT\n\
+	LG      1,0(1)\n\
+	LTGR    1,1\n\
+	JE      .L22\n\
+	BASR    14,1\n\
+.L22:\n\
+#APP\n\
+	.align 4,0x07\n\
+	END_INIT\n\
+\n\
+/*@_init_PROLOG_ENDS*/\n\
+\n\
+/*@_init_EPILOG_BEGINS*/\n\
+	.align 4\n\
+	.section .init\n\
+#NO_APP\n\
+	.align 4\n\
+	LG	4,272(15)\n\
+	LMG	6,15,208(15)\n\
+	BR	4\n\
+#APP\n\
+	END_INIT\n\
+\n\
+/*@_init_EPILOG_ENDS*/\n\
+\n\
+/*@_fini_PROLOG_BEGINS*/\n\
+	.section .fini\n\
+#NO_APP\n\
+	.align 4\n\
+.globl _fini\n\
+	.type	 _fini,@function\n\
+_fini:\n\
+#	leaf function           0\n\
+#	automatics              0\n\
+#	outgoing args           0\n\
+#	need frame pointer      0\n\
+#	call alloca             0\n\
+#	has varargs             0\n\
+#	incoming args (stack)   0\n\
+#	function length         30\n\
+	STMG	6,15,48(15)\n\
+	LGR	1,15\n\
+	AGHI	15,-160\n\
+	STG	1,0(15)\n\
+	LARL	12,_GLOBAL_OFFSET_TABLE_\n\
+#APP\n\
+	.align 4,0x07\n\
+	END_FINI\n\
+\n\
+/*@_fini_PROLOG_ENDS*/\n\
+\n\
+/*@_fini_EPILOG_BEGINS*/\n\
+	.align 4\n\
+	.section .fini\n\
+#NO_APP\n\
+	.align 4\n\
+	LG	4,272(15)\n\
+	LMG	6,15,208(15)\n\
+	BR	4\n\
+#APP\n\
+	END_FINI\n\
+\n\
+/*@_fini_EPILOG_ENDS*/\n\
+\n\
+	/*@TRAILER_BEGINS*/\
 ");
diff --git a/sysdeps/s390/s390-64/sysdep.h b/sysdeps/s390/s390-64/sysdep.h
index 430cee30f8..b863d266b8 100644
--- a/sysdeps/s390/s390-64/sysdep.h
+++ b/sysdeps/s390/s390-64/sysdep.h
@@ -80,12 +80,12 @@
 #define mcount		_mcount
 #endif
 
-#define	PSEUDO(name, syscall_name, args)				      \
-lose: SYSCALL_PIC_SETUP							      \
-  JUMPTARGET(syscall_error)						      \
-  .globl syscall_error;							      \
-  ENTRY (name)								      \
-  DO_CALL (syscall_name, args);						      \
+#define	PSEUDO(name, syscall_name, args) \
+lose: SYSCALL_PIC_SETUP			\
+  jg JUMPTARGET(syscall_error);		\
+  .globl syscall_error;			\
+  ENTRY (name)				\
+  DO_CALL (syscall_name, args);		\
   jm lose
 
 #undef	PSEUDO_END
@@ -94,13 +94,11 @@ lose: SYSCALL_PIC_SETUP							      \
 
 #undef JUMPTARGET
 #ifdef PIC
-#define JUMPTARGET(name)  \
-    brasl name##@PLT
+#define JUMPTARGET(name)	name##@PLT
 #define SYSCALL_PIC_SETUP \
     larl  %r12,_GLOBAL_OFFSET_TABLE_
 #else
-#define JUMPTARGET(name)  \
-    brasl name
+#define JUMPTARGET(name)	name
 #define SYSCALL_PIC_SETUP	/* Nothing.  */
 #endif