From: Jeff Law Date: Wed, 10 Mar 1993 17:31:38 +0000 (-0700) Subject: pa.c (cint_ok_for_move): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6746a52edba30ed032a9e341cfbd363e4fa506f6;p=gcc.git 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 --- diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a42a87e3c7f..de5d5f76830 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;