This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to combine for simplify_comparision()


Hi Jeff,

:   > Thu Sep 23 11:42:11 1999  Nick Clifton  <nickc@cygnus.com>
:   > 
:   > 	* combine.c (simplify_comparison): Use an unsigned shift to adjust
:   > 	the constant.
: This is fine with a couple trivial changes.
: 
: First, a short comment about the need to use unsigned arithmetic would be
: wise.  Second s/foo/temp/, or something similar.  As a variable name "foo"
: leaves a lot to be desired.

Done.

: The testcase needs a change too -- remember we have targets where
: ints are 16 bits :-)  If you do not want to generalize the test to those
: targets, then you should add something like
: 
: if (sizeof (int) != 4)
:   exit 0
: 
: To the test to prevent it from barfing on our targets with 16bit ints.

I have changed all the use of 'short' and 'int' to 'long' and added an
L suffix to the constants.  This should suffice I hope.  (I also
retested the test and it does still fail without the patch applied and
pass with the patch applied).

Cheers
	Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]