From: Claudiu Zissulescu Date: Fri, 14 Apr 2017 11:41:04 +0000 (+0200) Subject: [ARC] Use long jumps for CRT calls X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19b250c43ae355e88176310cf2be282bd381d6b3;p=gcc.git [ARC] Use long jumps for CRT calls gcc/ 2017-04-17 Claudiu Zissulescu * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls. From-SVN: r246927 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 312ef8d7ba4..5cf927dac7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-04-14 Claudiu Zissulescu + + * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls. + 2017-04-14 Claudiu Zissulescu * config/arc/arc-protos.h (arc_decl_pretend_args): Remove. diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 2706a85f023..1ffb5dec51e 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -1515,10 +1515,11 @@ extern enum arc_function_type arc_compute_function_type (struct function *); /* Called by crtstuff.c to make calls to function FUNCTION that are defined in SECTION_OP, and then to switch back to text section. */ #undef CRT_CALL_STATIC_FUNCTION -#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ - asm (SECTION_OP "\n\t" \ - "bl @" USER_LABEL_PREFIX #FUNC "\n" \ - TEXT_SECTION_ASM_OP); +#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ + asm (SECTION_OP "\n\t" \ + "add r12,pcl,@" USER_LABEL_PREFIX #FUNC "@pcl\n\t" \ + "jl [r12]\n" \ + TEXT_SECTION_ASM_OP); /* This macro expands to the name of the scratch register r12, used for temporary calculations according to the ABI. */