1691633d1cb03106c92d2a0e3a27ada93d6837e2
[platform/upstream/gcc.git] / gcc / config / pa / pa64-linux.h
1 /* Definitions for PA_RISC with ELF format on 64-bit Linux
2    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #undef CPP_SPEC
22 #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{mhppa:-D__hppa__} %{posix:-D_POSIX_SOURCE} -D_PA_RISC2_0 -D__LP64__"
23
24 #if 0 /* needs some work :-( */
25 /* If defined, this macro specifies a table of register pairs used to
26    eliminate unneeded registers that point into the stack frame.  */
27
28 #define ELIMINABLE_REGS                                                 \
29 {                                                                       \
30   {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},                         \
31   {ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM},                         \
32   {ARG_POINTER_REGNUM,   FRAME_POINTER_REGNUM},                         \
33 }
34
35 /* A C expression that returns nonzero if the compiler is allowed to try to
36    replace register number FROM with register number TO.  The frame pointer
37    is automatically handled.  */
38
39 #define CAN_ELIMINATE(FROM, TO) 1
40
41 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It
42    specifies the initial difference between the specified pair of
43    registers.  This macro must be defined if `ELIMINABLE_REGS' is
44    defined.  */
45 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
46   do                                                            \
47     {                                                           \
48       int fsize;                                                \
49                                                                 \
50       fsize = compute_frame_size (get_frame_size (), 0);        \
51       if ((TO) == FRAME_POINTER_REGNUM                          \
52           && (FROM) == ARG_POINTER_REGNUM)                      \
53         {                                                       \
54           (OFFSET) = -16;                                       \
55           break;                                                \
56         }                                                       \
57                                                                 \
58       if ((TO) != STACK_POINTER_REGNUM)                         \
59         abort ();                                               \
60                                                                 \
61       switch (FROM)                                             \
62         {                                                       \
63         case FRAME_POINTER_REGNUM:                              \
64           (OFFSET) = - fsize;                                   \
65           break;                                                \
66                                                                 \
67         case ARG_POINTER_REGNUM:                                \
68           (OFFSET) = - fsize - 16;                              \
69           break;                                                \
70                                                                 \
71         default:                                                \
72           abort ();                                             \
73         }                                                       \
74     } while (0)
75 #endif