1 /* Copyright (C) 2005 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 #include <tcb-offsets.h>
20 #include <asm/unistd.h>
23 #define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
25 #define __VFORK_METAG_LOAD_TP ___metag_load_tp
28 /* Save the PID value. */
30 SETL [A0StP++], D0FrT, D1RtP; \
31 CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
32 SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
33 GETD D0FrT, [D0Re0 + #PID]; \
35 SETD [D0Re0 + #PID], D0FrT; \
36 GETL D0FrT, D1RtP, [--A0StP];
41 MSETL [A0StP++], D0Re0, D0FrT; \
42 CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
43 SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
44 GETD D0FrT, [D0Re0 + #PID]; \
46 SETD [D0Re0 + #PID], D0FrT; \
47 GETL D0FrT, D1RtP, [--A0StP]; \
48 GETL D0Re0, D1Re0, [--A0StP]; \
51 #include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>