This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix Bug target/21684 SHIFT_COUNT_TRUNCATED incorrectlydefined for MCORE
- From: James E Wilson <wilson at specifix dot com>
- To: Kevin Winchester <winchester at amirix dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 Aug 2005 17:28:36 -0700
- Subject: Re: [PATCH] Fix Bug target/21684 SHIFT_COUNT_TRUNCATED incorrectlydefined for MCORE
- References: <428F3D62.7080504@amirix.com>
Kevin Winchester wrote:
> * gcc/config/mcore/mcore.h (SHIFT_COUNT_TRUNCATED): Removed
> definition as it is not valid for the MCORE.
The analysis is correct here. However, it isn't safe to simply remove
the definition, as someone may accidentally readd it later. We need to
add a comment explaining why it can't be defined to true, and define it
to false. Like the attached patch.
I haven't tested this. If this works for you I can check it in for you.
:REVIEWURL http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02109.html:
--
Jim Wilson, GNU Tools Support, http://www.specifix.com
2005-08-15 James E Wilson <wilson@specifix.com>
Kevin Winchester <winchester@amirix.com>
PR target/21684
* config/mcore/mcore.h (SHIFT_COUNT_TRUNCATED): Define to 0.
Index: mcore.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore.h,v
retrieving revision 1.77
diff -p -p -r1.77 mcore.h
*** mcore.h 25 Jun 2005 01:21:40 -0000 1.77
--- mcore.h 16 Aug 2005 00:24:13 -0000
*************** extern const enum reg_class reg_class_fr
*** 820,831 ****
/* Nonzero if access to memory by bytes is slow and undesirable. */
#define SLOW_BYTE_ACCESS TARGET_SLOW_BYTES
! /* Immediate shift counts are truncated by the output routines (or was it
! the assembler?). Shift counts in a register are truncated by ARM. Note
! that the native compiler puts too large (> 32) immediate shift counts
! into a register and shifts by the register, letting the ARM decide what
! to do instead of doing that itself. */
! #define SHIFT_COUNT_TRUNCATED 1
/* All integers have the same format so truncation is easy. */
#define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC) 1
--- 820,829 ----
/* Nonzero if access to memory by bytes is slow and undesirable. */
#define SLOW_BYTE_ACCESS TARGET_SLOW_BYTES
! /* Shift counts are truncated to 6-bits (0 to 63) instead of the expected
! 5-bits, so we can not define SHIFT_COUNT_TRUNCATED to true for this
! target. */
! #define SHIFT_COUNT_TRUNCATED 0
/* All integers have the same format so truncation is easy. */
#define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC) 1