summaryrefslogtreecommitdiff
path: root/gcc/config/ia64/ia64.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-14 00:50:34 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-14 00:50:34 +0000
commit5c43f6507ecf553d86638bb5b318babcb6aaeec3 (patch)
treef528ed25ee144d3558289d8725d28f56df5995ca /gcc/config/ia64/ia64.h
parent0837efa0d36f65b966116c0ffd2a2a351e0b83bf (diff)
downloadgcc-5c43f6507ecf553d86638bb5b318babcb6aaeec3.tar.gz
* defaults.h (TARGET_VTABLE_ENTRY_ALIGN): New.
(TARGET_VTABLE_DATA_ENTRY_DISTANCE): New. * doc/tm.texi: Document them. * config/ia64/ia64.h (TARGET_VTABLE_ENTRY_ALIGN): New. (TARGET_VTABLE_DATA_ENTRY_DISTANCE): New. (TARGET_VTABLE_USES_DESCRIPTORS): 4 word descriptors for 32-bit mode. (ASM_OUTPUT_FDESC): Likewise. * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. (build_vbase_offset_vtbl_entries): Likewise. * rtti.c (build_headof): Likewise. (get_tinfo_decl_dynamic): Likewise. (create_pseudo_type_info): Likewise. * g++.old-deja/g++.abi/vtable2.C (INC_VDATA): New. Define for ia64 ilp32. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ia64/ia64.h')
-rw-r--r--gcc/config/ia64/ia64.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 83da1644e7f..8aa8140d53b 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -342,8 +342,21 @@ while (0)
function descriptors instead. The value of this macro says how
many words wide the descriptor is (normally 2). It is assumed
that the address of a function descriptor may be treated as a
- pointer to a function. */
-#define TARGET_VTABLE_USES_DESCRIPTORS 2
+ pointer to a function.
+
+ For reasons known only to HP, the vtable entries (as opposed to
+ normal function descriptors) are 16 bytes wide in 32-bit mode as
+ well, even though the 3rd and 4th words are unused. */
+#define TARGET_VTABLE_USES_DESCRIPTORS (TARGET_ILP32 ? 4 : 2)
+
+/* Due to silliness in the HPUX linker, vtable entries must be
+ 8-byte aligned even in 32-bit mode. Rather than create multiple
+ ABIs, force this restriction on everyone else too. */
+#define TARGET_VTABLE_ENTRY_ALIGN 64
+
+/* Due to the above, we need extra padding for the data entries below 0
+ to retain the alignment of the descriptors. */
+#define TARGET_VTABLE_DATA_ENTRY_DISTANCE (TARGET_ILP32 ? 2 : 1)
/* Layout of Source Language Data Types */
@@ -1454,9 +1467,14 @@ do { \
do { \
if ((PART) == 0) \
{ \
- fputs ("\tdata16.ua @iplt(", FILE); \
+ if (TARGET_ILP32) \
+ fputs ("\tdata8.ua @iplt(", FILE); \
+ else \
+ fputs ("\tdata16.ua @iplt(", FILE); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \
fputs (")\n", FILE); \
+ if (TARGET_ILP32) \
+ fputs ("\tdata8.ua 0\n", FILE); \
} \
} while (0)