Commit 9181f8db by Jeff Knaggs Committed by Alexandre Oliva

typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index into the…

typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index into the vtable_entry array regardless of...

* typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index
into the vtable_entry array regardless of
TARGET_PTRMEMFUNC_VBIT_LOCATION.

From-SVN: r51192
parent 7f48c9e1
2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
* typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index
into the vtable_entry array regardless of
TARGET_PTRMEMFUNC_VBIT_LOCATION.
2002-03-21 Aldy Hernandez <aldyh@redhat.com>
* tree.c (cp_cannot_inline_tree_fn): Same.
......
......@@ -2890,19 +2890,18 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
load-with-sign-extend, while the second used normal load then
shift to sign-extend. An optimizer flaw, perhaps, but it's
easier to make this change. */
idx = cp_build_binary_op (TRUNC_DIV_EXPR,
build1 (NOP_EXPR, vtable_index_type, e3),
TYPE_SIZE_UNIT (vtable_entry_type));
switch (TARGET_PTRMEMFUNC_VBIT_LOCATION)
{
case ptrmemfunc_vbit_in_pfn:
idx = cp_build_binary_op (TRUNC_DIV_EXPR,
build1 (NOP_EXPR, vtable_index_type, e3),
TYPE_SIZE_UNIT (vtable_entry_type));
e1 = cp_build_binary_op (BIT_AND_EXPR,
build1 (NOP_EXPR, vtable_index_type, e3),
integer_one_node);
break;
case ptrmemfunc_vbit_in_delta:
idx = build1 (NOP_EXPR, vtable_index_type, e3);
e1 = cp_build_binary_op (BIT_AND_EXPR,
delta, integer_one_node);
delta = cp_build_binary_op (RSHIFT_EXPR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment