From 1a6058d9a9f9ca735f046c01e2adc27b621e34cb Mon Sep 17 00:00:00 2001 From: Philip Blundell Date: Fri, 12 Mar 2004 19:21:24 +0000 Subject: [PATCH] re PR target/14558 (ICE while building xfree86 4.3: insn does not satisfy its constraints) 2004-03-12 Philip Blundell PR target/14558 Backport from trunk: 2004-02-25 Richard Earnshaw * arm.h (ARM_GO_IF_LEGITIMATE_INDEX): For QImode the range of an offset is -4095...+4095 inclusive. From-SVN: r79403 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/arm.h | 15 +++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f14067b3164..7561fcd3d70e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-03-12 Philip Blundell + + PR target/14558 + Backport from trunk: + 2004-02-25 Richard Earnshaw + * arm.h (ARM_GO_IF_LEGITIMATE_INDEX): For QImode the range of + an offset is -4095...+4095 inclusive. + 2004-03-11 Richard Henderson PR target/14539 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 5b03c6ffec22..cb49f572efbf 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2003,10 +2003,17 @@ typedef struct && INTVAL (op) <= 31) \ goto LABEL; \ } \ - /* NASTY: Since this limits the addressing of unsigned \ - byte loads. */ \ - range = ((MODE) == HImode || (MODE) == QImode) \ - ? (arm_arch4 ? 256 : 4095) : 4096; \ + /* XXX For ARM v4 we may be doing a sign-extend operation \ + during the load, but that has a restricted addressing \ + range and we are unable to tell here whether that is the \ + case. To be safe we restrict all loads to that \ + range. */ \ + if (arm_arch4) \ + range = (mode == HImode || mode == QImode) ? 256 : 4096; \ + else if (mode == HImode) \ + range = 4095; \ + else \ + range = 4096; \ if (code == CONST_INT && INTVAL (INDEX) < range \ && INTVAL (INDEX) > -range) \ goto LABEL; \ -- 2.47.2