Commit 4ded6adc by Michael Meissner Committed by Michael Meissner

predicates.md (cint34_operand): Update SIGNED_34BIT_OFFSET_P call.

2019-07-10  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/predicates.md (cint34_operand): Update
	SIGNED_34BIT_OFFSET_P call.
	(pcrel_address): Update SIGNED_34BIT_OFFSET_P call.
	(pcrel_external_address): Update SIGNED_34BIT_OFFSET_P call.
	* config/rs6000/rs6000.c (rs6000_prefixed_address): Update
	SIGNED_16BIT_OFFSET_P and SIGNED_34BIT_OFFSET_P calls.
	* config/rs6000/rs6000.h (SIGNED_16BIT_OFFSET_P): Remove EXTRA
	argument.
	(SIGNED_34BIT_OFFSET_P): Remove EXTRA argument.
	(SIGNED_16BIT_OFFSET_EXTRA_P): New macro, like
	SIGNED_16BIT_OFFSET_P with an EXTRA argument.
	(SIGNED_34BIT_OFFSET_EXTRA_P): New macro, like
	SIGNED_34BIT_OFFSET_P with an EXTRA argument.

From-SVN: r273370
parent 4b5c5391
2019-07-10 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/predicates.md (cint34_operand): Update
SIGNED_34BIT_OFFSET_P call.
(pcrel_address): Update SIGNED_34BIT_OFFSET_P call.
(pcrel_external_address): Update SIGNED_34BIT_OFFSET_P call.
* config/rs6000/rs6000.c (rs6000_prefixed_address): Update
SIGNED_16BIT_OFFSET_P and SIGNED_34BIT_OFFSET_P calls.
* config/rs6000/rs6000.h (SIGNED_16BIT_OFFSET_P): Remove EXTRA
argument.
(SIGNED_34BIT_OFFSET_P): Remove EXTRA argument.
(SIGNED_16BIT_OFFSET_EXTRA_P): New macro, like
SIGNED_16BIT_OFFSET_P with an EXTRA argument.
(SIGNED_34BIT_OFFSET_EXTRA_P): New macro, like
SIGNED_34BIT_OFFSET_P with an EXTRA argument.
2019-07-10 Iain Sandoe <iain@sandoe.co.uk> 2019-07-10 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (LIB_SPEC): Collate this spec here. * config/rs6000/darwin.h (LIB_SPEC): Collate this spec here.
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
if (!TARGET_PREFIXED_ADDR) if (!TARGET_PREFIXED_ADDR)
return 0; return 0;
return SIGNED_34BIT_OFFSET_P (INTVAL (op), 0); return SIGNED_34BIT_OFFSET_P (INTVAL (op));
}) })
;; Return 1 if op is a register that is not special. ;; Return 1 if op is a register that is not special.
...@@ -1638,7 +1638,7 @@ ...@@ -1638,7 +1638,7 @@
rtx op0 = XEXP (op, 0); rtx op0 = XEXP (op, 0);
rtx op1 = XEXP (op, 1); rtx op1 = XEXP (op, 1);
if (!CONST_INT_P (op1) || !SIGNED_34BIT_OFFSET_P (INTVAL (op1), 0)) if (!CONST_INT_P (op1) || !SIGNED_34BIT_OFFSET_P (INTVAL (op1)))
return false; return false;
op = op0; op = op0;
...@@ -1673,7 +1673,7 @@ ...@@ -1673,7 +1673,7 @@
rtx op0 = XEXP (op, 0); rtx op0 = XEXP (op, 0);
rtx op1 = XEXP (op, 1); rtx op1 = XEXP (op, 1);
if (!CONST_INT_P (op1) || !SIGNED_34BIT_OFFSET_P (INTVAL (op1), 0)) if (!CONST_INT_P (op1) || !SIGNED_34BIT_OFFSET_P (INTVAL (op1)))
return false; return false;
op = op0; op = op0;
......
...@@ -21523,11 +21523,11 @@ rs6000_prefixed_address (rtx addr, machine_mode mode) ...@@ -21523,11 +21523,11 @@ rs6000_prefixed_address (rtx addr, machine_mode mode)
return false; return false;
HOST_WIDE_INT value = INTVAL (op1); HOST_WIDE_INT value = INTVAL (op1);
if (!SIGNED_34BIT_OFFSET_P (value, 0)) if (!SIGNED_34BIT_OFFSET_P (value))
return false; return false;
/* Offset larger than 16-bits? */ /* Offset larger than 16-bits? */
if (!SIGNED_16BIT_OFFSET_P (value, 0)) if (!SIGNED_16BIT_OFFSET_P (value))
return true; return true;
/* DQ instruction (bottom 4 bits must be 0) for vectors. */ /* DQ instruction (bottom 4 bits must be 0) for vectors. */
......
...@@ -2526,16 +2526,27 @@ typedef struct GTY(()) machine_function ...@@ -2526,16 +2526,27 @@ typedef struct GTY(()) machine_function
#pragma GCC poison TARGET_FLOAT128 OPTION_MASK_FLOAT128 MASK_FLOAT128 #pragma GCC poison TARGET_FLOAT128 OPTION_MASK_FLOAT128 MASK_FLOAT128
#endif #endif
/* Whether a given VALUE is a valid 16- or 34-bit signed offset. EXTRA is the /* Whether a given VALUE is a valid 16 or 34-bit signed offset. */
amount that we can't touch at the high end of the range (typically if the #define SIGNED_16BIT_OFFSET_P(VALUE) \
address is split into smaller addresses, the extra covers the addresses IN_RANGE ((VALUE), \
which might be generated when the insn is split). */ -(HOST_WIDE_INT_1 << 15), \
#define SIGNED_16BIT_OFFSET_P(VALUE, EXTRA) \ (HOST_WIDE_INT_1 << 15) - 1)
IN_RANGE (VALUE, \
#define SIGNED_34BIT_OFFSET_P(VALUE) \
IN_RANGE ((VALUE), \
-(HOST_WIDE_INT_1 << 33), \
(HOST_WIDE_INT_1 << 33) - 1)
/* Like SIGNED_16BIT_OFFSET_P and SIGNED_34BIT_OFFSET_P, but with an extra
argument that gives a length to validate a range of addresses, to allow for
splitting insns into several insns, each of which has an offsettable
address. */
#define SIGNED_16BIT_OFFSET_EXTRA_P(VALUE, EXTRA) \
IN_RANGE ((VALUE), \
-(HOST_WIDE_INT_1 << 15), \ -(HOST_WIDE_INT_1 << 15), \
(HOST_WIDE_INT_1 << 15) - 1 - (EXTRA)) (HOST_WIDE_INT_1 << 15) - 1 - (EXTRA))
#define SIGNED_34BIT_OFFSET_P(VALUE, EXTRA) \ #define SIGNED_34BIT_OFFSET_EXTRA_P(VALUE, EXTRA) \
IN_RANGE (VALUE, \ IN_RANGE ((VALUE), \
-(HOST_WIDE_INT_1 << 33), \ -(HOST_WIDE_INT_1 << 33), \
(HOST_WIDE_INT_1 << 33) - 1 - (EXTRA)) (HOST_WIDE_INT_1 << 33) - 1 - (EXTRA))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment