Commit eeff9307 by Jakub Jelinek Committed by Jakub Jelinek

rs6000.c (rs6000_output_mi_thunk): Remove bogus clearing of SYMBOL_FLAG_LOCAL bit.

	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Remove bogus
	clearing of SYMBOL_FLAG_LOCAL bit.
	If vcall_offset fits into signed 16-bit immediate, use
	one instruction for both addition and load.

From-SVN: r69055
parent b6fa901b
2003-07-07 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Remove bogus
clearing of SYMBOL_FLAG_LOCAL bit.
If vcall_offset fits into signed 16-bit immediate, use
one instruction for both addition and load.
2003-07-07 Neil Booth <neil@daikokuya.co.uk> 2003-07-07 Neil Booth <neil@daikokuya.co.uk>
* opts.c (common_handle_option): Correct handling of the * opts.c (common_handle_option): Correct handling of the
......
...@@ -12374,10 +12374,19 @@ rs6000_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) ...@@ -12374,10 +12374,19 @@ rs6000_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
rtx tmp = gen_rtx_REG (Pmode, 12); rtx tmp = gen_rtx_REG (Pmode, 12);
emit_move_insn (tmp, gen_rtx_MEM (Pmode, this)); emit_move_insn (tmp, gen_rtx_MEM (Pmode, this));
emit_insn (TARGET_32BIT if (((unsigned HOST_WIDE_INT) vcall_offset) + 0x8000 >= 0x10000)
? gen_addsi3 (tmp, tmp, vcall_offset_rtx) {
: gen_adddi3 (tmp, tmp, vcall_offset_rtx)); emit_insn (TARGET_32BIT
emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp)); ? gen_addsi3 (tmp, tmp, vcall_offset_rtx)
: gen_adddi3 (tmp, tmp, vcall_offset_rtx));
emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp));
}
else
{
rtx loc = gen_rtx_PLUS (Pmode, tmp, vcall_offset_rtx);
emit_move_insn (tmp, gen_rtx_MEM (Pmode, loc));
}
emit_insn (TARGET_32BIT emit_insn (TARGET_32BIT
? gen_addsi3 (this, this, tmp) ? gen_addsi3 (this, this, tmp)
: gen_adddi3 (this, this, tmp)); : gen_adddi3 (this, this, tmp));
...@@ -12390,7 +12399,6 @@ rs6000_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) ...@@ -12390,7 +12399,6 @@ rs6000_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
TREE_USED (function) = 1; TREE_USED (function) = 1;
} }
funexp = XEXP (DECL_RTL (function), 0); funexp = XEXP (DECL_RTL (function), 0);
SYMBOL_REF_FLAGS (funexp) &= ~SYMBOL_FLAG_LOCAL;
funexp = gen_rtx_MEM (FUNCTION_MODE, funexp); funexp = gen_rtx_MEM (FUNCTION_MODE, funexp);
#if TARGET_MACHO #if TARGET_MACHO
......
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