Blame sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S

Packit 6c4009
/* Copyright (C) 2012-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#include <sysdep.h>
Packit 6c4009
Packit 6c4009
ENTRY(__makecontext_ret)
Packit 6c4009
	/* Mark r14 as undefined in order to stop unwinding here!  */
Packit 6c4009
	cfi_undefined (r14)
Packit 6c4009
	basr  %r14,%r7
Packit 6c4009
	ltr   %r8,%r8			/* Check whether uc_link is 0.  */
Packit 6c4009
	jz    1f
Packit 6c4009
	lr    %r2,%r8
Packit 6c4009
	br    %r9
Packit 6c4009
1:	lhi   %r2,0			/* EXIT return value.  */
Packit 6c4009
#ifdef NO_HIDDEN
Packit 6c4009
	/* If SHARED and NO_HIDDEN is defined, we need to setup got pointer
Packit 6c4009
	   as HIDDEN_JUMPTARGET expands to JUMPTARGET which expands to
Packit 6c4009
	   exit@PLT.  Otherwise HIDDEN_JUMPTARGET expands to __GI_exit if
Packit 6c4009
	   SHARED is defined and to exit if SHARED is not defined.  */
Packit 6c4009
	SYSCALL_PIC_SETUP
Packit 6c4009
#endif
Packit 6c4009
	basr	%r1,0
Packit 6c4009
2:
Packit 6c4009
	al	%r1,3f-2b(%r1)
Packit 6c4009
	basr	%r14,%r1		/* Call exit.  */
Packit 6c4009
	j	.+2			/* Trap if exit returns for some reason.  */
Packit 6c4009
3:
Packit 6c4009
	.long   HIDDEN_JUMPTARGET (exit) - 2b
Packit 6c4009
END(__makecontext_ret)