1 /* Assembler macros for m68k.
2 Copyright (C) 1998-2015 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
19 #include <sysdeps/generic/sysdep.h>
23 /* Define an entry point visible from C.
25 There is currently a bug in gdb which prevents us from specifying
26 incomplete stabs information. Fake some entries here which specify
27 the current source file. */
28 # define ENTRY(name) \
29 .globl C_SYMBOL_NAME(name); \
30 .type C_SYMBOL_NAME(name),@function; \
42 /* If compiled for profiling, call `_mcount' at the start of each function. */
44 /* The mcount code relies on a normal frame pointer being on the stack
45 to locate our caller, so push one just for its benefit. */
46 # define CALL_MCOUNT \
48 cfi_adjust_cfa_offset (4); cfi_rel_offset (%a6, 0); \
50 jbsr JUMPTARGET (_mcount); \
52 cfi_adjust_cfa_offset (-4); cfi_restore (%a6);
54 # define CALL_MCOUNT /* Do nothing. */
57 # define PSEUDO(name, syscall_name, args) \
58 .globl __syscall_error; \
60 DO_CALL (syscall_name, args); \
61 jcc JUMPTARGET(__syscall_error)
64 # define PSEUDO_END(name) \
69 # define JUMPTARGET(name) name##@PLTPC
71 # define JUMPTARGET(name) name
74 #endif /* __ASSEMBLER__ */