aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2017-04-14 13:41:04 +0200
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2017-04-14 13:41:04 +0200
commit19b250c43ae355e88176310cf2be282bd381d6b3 (patch)
tree23b47008c35430779b64aec1ae191efd189e5c96
parent213c9bf1219497f096351f7b8f9905cffc79f416 (diff)
downloadgcc-19b250c43ae355e88176310cf2be282bd381d6b3.zip
gcc-19b250c43ae355e88176310cf2be282bd381d6b3.tar.gz
gcc-19b250c43ae355e88176310cf2be282bd381d6b3.tar.bz2
[ARC] Use long jumps for CRT calls
gcc/ 2017-04-17 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls. From-SVN: r246927
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arc/arc.h9
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 312ef8d..5cf927d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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.
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 2706a85..1ffb5de 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. */