diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-21 16:58:22 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-21 16:58:22 +0000 |
commit | 6bfa2cc1b1757ca919c796642fcb4ee2d7fe7fa7 (patch) | |
tree | 746cb9ad4b9e1b8562a39be3d23d3c85abfdac19 /gcc/varasm.c | |
parent | 9f2cc694fb01b917c88cd6ce3b3d44c0e90b87a1 (diff) | |
download | gcc-6bfa2cc1b1757ca919c796642fcb4ee2d7fe7fa7.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45733 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index f00b596b270..72ec1a272ae 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4277,6 +4277,7 @@ initializer_constant_valid_p (value, endtype) return null_pointer_node; case ADDR_EXPR: + case FDESC_EXPR: return staticp (TREE_OPERAND (value, 0)) ? TREE_OPERAND (value, 0) : 0; case NON_LVALUE_EXPR: @@ -4469,6 +4470,18 @@ output_constant (exp, size, align) return; } + if (TREE_CODE (exp) == FDESC_EXPR) + { + HOST_WIDE_INT part = tree_low_cst (TREE_OPERAND (exp, 1), 0); + tree decl = TREE_OPERAND (exp, 0); +#ifdef ASM_OUTPUT_FDESC + ASM_OUTPUT_FDESC (asm_out_file, decl, part); +#else + abort (); +#endif + return; + } + switch (code) { case CHAR_TYPE: |