From 5329e2276aeb65fc8b6e8b1ddc7c99ba0a12064b Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Wed, 10 Mar 1993 16:57:05 +0000 Subject: [PATCH] (reg_or_cint_move_operand): New function. (move_operand): Add header comment. From-SVN: r3693 --- gcc/config/pa/pa.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 45205208356..a42a87e3c7f 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -156,6 +156,8 @@ reg_or_0_or_nonsymb_mem_operand (op, mode) return 0; } +/* Accept anything that can be moved in one instruction into a general + register. */ int move_operand (op, mode) rtx op; @@ -185,6 +187,25 @@ move_operand (op, mode) return memory_address_p (mode, op); } +/* Accept REG and any CONST_INT that can be moved in one instruction into a + general register. */ +int +reg_or_cint_move_operand (op, mode) + rtx op; + enum machine_mode mode; +{ + if (register_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 0; +} + int pic_operand (op, mode) rtx op; -- 2.30.2