aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-03-10 10:31:38 -0700
committerJeff Law <law@gcc.gnu.org>1993-03-10 10:31:38 -0700
commit6746a52edba30ed032a9e341cfbd363e4fa506f6 (patch)
tree1d2d4881f69c792ca3df88f3ee1cacae9f80b39a
parent08cddb03ae279dcab585a53833729e00e13e8645 (diff)
downloadgcc-6746a52edba30ed032a9e341cfbd363e4fa506f6.zip
gcc-6746a52edba30ed032a9e341cfbd363e4fa506f6.tar.gz
gcc-6746a52edba30ed032a9e341cfbd363e4fa506f6.tar.bz2
pa.c (cint_ok_for_move): New function.
* pa.c (cint_ok_for_move): New function. Returns 1 iff the given CONST_INT can be loaded into a register in a single instruction. (move_operand): Use cink_ok_for_move. From-SVN: r3696
-rw-r--r--gcc/config/pa/pa.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index a42a87e..de5d5f7 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -156,6 +156,17 @@ reg_or_0_or_nonsymb_mem_operand (op, mode)
return 0;
}
+/* Accept any constant that can be moved in one instructions into a
+ general register. */
+int
+cint_ok_for_move (intval)
+ int intval;
+{
+ /* OK if ldo, ldil, or zdepi, can be used. */
+ return (VAL_14_BITS_P (intval) || (intval & 0x7ff) == 0
+ || zdepi_cint_p (intval));
+}
+
/* Accept anything that can be moved in one instruction into a general
register. */
int
@@ -167,11 +178,7 @@ move_operand (op, mode)
return 1;
if (GET_CODE (op) == CONST_INT)
- {
- /* OK if ldo, ldil, or zdepi, can be used. */
- return (INT_14_BITS (op) || (INTVAL (op) & 0x7ff) == 0
- || zdepi_cint_p (INTVAL (op)));
- }
+ return cint_ok_for_move (INTVAL (op));
if (GET_MODE (op) != mode)
return 0;