From d724c8f0a9ea6bbb8bfd10fc00754902093e40ce Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Thu, 28 Oct 2010 12:36:14 +0000 Subject: [PATCH] arm.c (const_ok_for_arm): Support 0xXY00XY00 pattern constants in thumb2. 2010-10-28 Andrew Stubbs gcc/ * config/arm/arm.c (const_ok_for_arm): Support 0xXY00XY00 pattern constants in thumb2. From-SVN: r166029 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2437bfd50496..bcdb1c281b7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-28 Andrew Stubbs + + * config/arm/arm.c (const_ok_for_arm): Support 0xXY00XY00 pattern + constants in thumb2. + 2010-10-28 Eric Botcazou * combine.c (set_nonzero_bits_and_sign_copies): Use unsigned diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 2586a272857e..a246d5b64d93 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2363,11 +2363,17 @@ const_ok_for_arm (HOST_WIDE_INT i) { HOST_WIDE_INT v; - /* Allow repeated pattern. */ + /* Allow repeated patterns 0x00XY00XY or 0xXYXYXYXY. */ v = i & 0xff; v |= v << 16; if (i == v || i == (v | (v << 8))) return TRUE; + + /* Allow repeated pattern 0xXY00XY00. */ + v = i & 0xff00; + v |= v << 16; + if (i == v) + return TRUE; } return FALSE; -- 2.43.5