aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2009-07-14 17:46:15 -0400
committerDJ Delorie <dj@gcc.gnu.org>2009-07-14 17:46:15 -0400
commita9d1723f3a269620f6ec157e27d7032e9b4eadcc (patch)
tree628b6ca227c7c1b689283cf8ff9bf0529db08c38
parent868e7c379bc46423a29f4ee433818a0ac71c22b4 (diff)
downloadgcc-a9d1723f3a269620f6ec157e27d7032e9b4eadcc.zip
gcc-a9d1723f3a269620f6ec157e27d7032e9b4eadcc.tar.gz
gcc-a9d1723f3a269620f6ec157e27d7032e9b4eadcc.tar.bz2
mep.c (mep_vliw_jmp_match): New function.
* config/mep/mep.c (mep_vliw_jmp_match): New function. * config/mep/mep-protos.h (mep_vliw_jmp_match): Prototype it. * config/mep/mep.md (sibcall_internal): Change test from mep_vliw_mode_match to mep_vliw_jmp_match. (sibcall_value_internal): Likewise. From-SVN: r149644
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/mep/mep-protos.h1
-rw-r--r--gcc/config/mep/mep.c14
-rw-r--r--gcc/config/mep/mep.md4
4 files changed, 25 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dc77e9d..66697c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-14 DJ Delorie <dj@redhat.com>
+
+ * config/mep/mep.c (mep_vliw_jmp_match): New function.
+ * config/mep/mep-protos.h (mep_vliw_jmp_match): Prototype it.
+ * config/mep/mep.md (sibcall_internal): Change test from
+ mep_vliw_mode_match to mep_vliw_jmp_match.
+ (sibcall_value_internal): Likewise.
+
2009-07-14 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (copysign<mode>3): New expander.
diff --git a/gcc/config/mep/mep-protos.h b/gcc/config/mep/mep-protos.h
index eb37702..a4de754 100644
--- a/gcc/config/mep/mep-protos.h
+++ b/gcc/config/mep/mep-protos.h
@@ -33,6 +33,7 @@ extern bool mep_allow_clip (rtx, rtx, int);
extern bool mep_bit_position_p (rtx, bool);
extern bool mep_split_mov (rtx *, int);
extern bool mep_vliw_mode_match (rtx);
+extern bool mep_vliw_jmp_match (rtx);
extern bool mep_multi_slot (rtx);
extern bool mep_legitimate_address (enum machine_mode, rtx, int);
extern int mep_legitimize_address (rtx *, rtx, enum machine_mode);
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 9e63b4d..80d2018 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -1182,6 +1182,20 @@ mep_vliw_mode_match (rtx tgt)
return src_vliw == tgt_vliw;
}
+/* Like the above, but also test for near/far mismatches. */
+
+bool
+mep_vliw_jmp_match (rtx tgt)
+{
+ bool src_vliw = mep_vliw_function_p (cfun->decl);
+ bool tgt_vliw = INTVAL (tgt);
+
+ if (mep_section_tag (DECL_RTL (cfun->decl)) == 'f')
+ return false;
+
+ return src_vliw == tgt_vliw;
+}
+
bool
mep_multi_slot (rtx x)
{
diff --git a/gcc/config/mep/mep.md b/gcc/config/mep/mep.md
index 2b6aa80..828c3c5 100644
--- a/gcc/config/mep/mep.md
+++ b/gcc/config/mep/mep.md
@@ -1923,7 +1923,7 @@
]
"SIBLING_CALL_P (insn)"
{
- if (mep_vliw_mode_match (operands[2]))
+ if (mep_vliw_jmp_match (operands[2]))
return "jmp\t%0";
else
return
@@ -1994,7 +1994,7 @@
]
"SIBLING_CALL_P (insn)"
{
- if (mep_vliw_mode_match (operands[3]))
+ if (mep_vliw_jmp_match (operands[3]))
return "jmp\t%1";
else
return