From 6723181663a87a735bdfdf2e16a6bd41dbc30be1 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 21 Sep 2001 09:58:22 -0700 Subject: tree.def (FDESC_EXPR): New. gcc/ * tree.def (FDESC_EXPR): New. * expr.c (expand_expr): Handle it. * varasm.c (initializer_constant_valid_p): Likewise. (output_constant): Likewise. * defaults.h (TARGET_VTABLE_USES_DESCRIPTORS): New. * config/ia64/ia64.h (TARGET_VTABLE_USES_DESCRIPTORS): New. (ASM_OUTPUT_FDESC): New. * doc/tm.texi: Document the new macros. gcc/cp/ * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. (build_vtbl_initializer): Likewise. (build_vfn_ref): New. * cp-tree.h: Declare it. * call.c (build_over_call): Use it. * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. gcc/java/ * class.c (get_dispatch_table): Handle function descriptors. (build_dtable_decl): Likewise. * expr.c (build_invokevirtual): Likewise. gcc/testsuite/ * g++.old-deja/g++.abi/ptrmem.C: Update for ia64 c++ abi. * g++.old-deja/g++.abi/vtable2.C: Likewise. From-SVN: r45733 --- gcc/defaults.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/defaults.h') diff --git a/gcc/defaults.h b/gcc/defaults.h index 32dd3e8..f9fef20 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -358,6 +358,16 @@ do { \ #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY #endif +/* By default, the C++ compiler will use function addresses in the + vtable entries. Setting this non-zero tells the compiler to use + 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. */ +#ifndef TARGET_VTABLE_USES_DESCRIPTORS +#define TARGET_VTABLE_USES_DESCRIPTORS 0 +#endif + /* Select a format to encode pointers in exception handling data. We prefer those that result in fewer dynamic relocations. Assume no special support here and encode direct references. */ -- cgit v1.1