Commit 1f8876c7 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[ARC] Fix calling multiple inheritances.

The TARGET_ASM_OUTPUT_MI_THUNK hook doesn't take into account the
variant when we compile for PIC.

gcc/
2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.

From-SVN: r247200
parent 8b22ef6a
2017-04-25 Claudiu Zissulescu <claziss@synopsys.com> 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_conditional_register_usage): Use ACCL, * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
ACCH registers whenever they are available. ACCH registers whenever they are available.
......
...@@ -6302,10 +6302,28 @@ arc_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, ...@@ -6302,10 +6302,28 @@ arc_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
fnaddr = XEXP (DECL_RTL (function), 0); fnaddr = XEXP (DECL_RTL (function), 0);
if (arc_is_longcall_p (fnaddr)) if (arc_is_longcall_p (fnaddr))
fputs ("\tj\t", file); {
if (flag_pic)
{
asm_fprintf (file, "\tld\t%s, [pcl, @",
ARC_TEMP_SCRATCH_REG);
assemble_name (file, XSTR (fnaddr, 0));
fputs ("@gotpc]\n", file);
asm_fprintf (file, "\tj\t[%s]", ARC_TEMP_SCRATCH_REG);
}
else
{
fputs ("\tj\t@", file);
assemble_name (file, XSTR (fnaddr, 0));
}
}
else else
fputs ("\tb\t", file); {
assemble_name (file, XSTR (fnaddr, 0)); fputs ("\tb\t@", file);
assemble_name (file, XSTR (fnaddr, 0));
if (flag_pic)
fputs ("@plt\n", file);
}
fputc ('\n', file); fputc ('\n', file);
} }
......
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