e4f2516ce7d238c7e7574638ef4478f09852274c
[gcc.git] / gcc / config / s390 / linux64.h
1 /* Definitions for Linux for s/390 zSeries
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Hartmut Penner (hpenner@de.ibm.com) and
4 Ulrich Weigand (uweigand@de.ibm.com).
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22 #ifndef _LINUX64_H
23 #define _LINUX64_H
24
25 #include <s390/linux.h> /* Base linux target machine definitions*/
26
27 #undef PTRDIFF_TYPE
28 #define PTRDIFF_TYPE "long int"
29
30 #undef TARGET_DEFAULT
31 #define TARGET_DEFAULT 0x13
32
33 #undef TARGET_VERSION
34 #define TARGET_VERSION fprintf (stderr, " (Linux for S/390 zSeries 64 bit)");
35
36 /* Names to predefine in the preprocessor for this target machine. */
37
38 #undef CPP_PREDEFINES
39 #define CPP_PREDEFINES \
40 "-Dlinux -Asystem(linux) -Acpu(s390) -Amachine(s390) -D__s390__ -D__s390x__ \
41 -Asystem(unix) -Dunix -D__ELF__ \
42 -D__LONG_MAX__=9223372036854775807L"
43
44 #undef LINK_SPEC
45 #ifdef CROSS_COMPILE
46 #define LINK_SPEC "-m elf64_s390 %{shared:-shared} \
47 %{!shared: \
48 %{!ibcs: \
49 %{!static: \
50 %{rdynamic:-export-dynamic} \
51 %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1 \
52 -rpath-link=/usr/local/s390x-ibm-linux/lib}} \
53 %{static:-static}}}"
54 #else
55 #define LINK_SPEC "-m elf64_s390 %{shared:-shared} \
56 %{!shared: \
57 %{!ibcs: \
58 %{!static: \
59 %{rdynamic:-export-dynamic} \
60 %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}} \
61 %{static:-static}}}"
62 #endif
63
64 #undef INT_ASM_OP
65 #define INT_ASM_OP "\t.quad\t"
66
67 #undef PROMOTE_PROTOTYPES
68 #undef MASK_RETURN_ADDR
69 #undef SELECT_SECTION
70
71 /* With 64 bit new linkage for floating point registers. */
72 #undef CALL_USED_REGISTERS
73 #define CALL_USED_REGISTERS \
74 { 1, 1, 1, 1, \
75 1, 1, 0, 0, \
76 0, 0, 0, 0, \
77 0, 1, 1, 1, \
78 1, 1, 1, 1, \
79 1, 1, 1, 1, \
80 0, 0, 0, 0, \
81 0, 0, 0, 0, \
82 1, 1 }
83
84 #endif