2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
+ * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
+
+2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
+
* config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
* config/arc/arc.c (arc_decl_pretend_args): Likewise.
* config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
/* 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. */