1 /* OSF/rose half-pic support functions.
2 Copyright (C) 1992 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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)
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.
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* The OSF/rose half-pic model assumes that the non-library code does
21 not need to have full PIC (position independent code), but rather,
22 that pointers to external references are put into the data section
23 and derefenced as normal pointers. References to static data does
24 not need to be PIC-ized.
26 Another optimization is to have the compiler know what symbols are
27 in the shared libraries, and to only lay down the pointers to
28 things which in the library proper. */
38 extern rtx eliminate_constant_term ();
40 int flag_half_pic; /* Global half-pic flag. */
43 /* Do any half-pic initializations. */
52 /* Encode in a declaration whether or not it is half-pic. */
55 half_pic_encode (decl)
59 fprintf (stderr, "\n========== Half_pic_encode\n");
65 /* Return whether an address is half-pic. */
68 half_pic_address_p (addr)
73 switch (GET_CODE (addr))
76 rtx offset = const0_rtx;
77 addr = eliminate_constant_term (addr, &offset);
78 if (GET_CODE (addr) != SYMBOL_REF)
84 name = XSTR (addr, 0);
86 /* If this is a label, it will have a '*' in front of it. */
94 #endif /* HALF_PIC_INIT */