fold-const.c (div_if_zero_remainder): Do signed divide for pointer types.
* fold-const.c (div_if_zero_remainder): Do signed divide for pointer types. From-SVN: r123966
This commit is contained in:
parent
06a4a50762
commit
8d5d586529
|
@ -1,3 +1,8 @@
|
||||||
|
2007-04-18 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* fold-const.c (div_if_zero_remainder): Do signed divide for pointer
|
||||||
|
types.
|
||||||
|
|
||||||
2007-04-18 Eric Christopher <echristo@apple.com>
|
2007-04-18 Eric Christopher <echristo@apple.com>
|
||||||
|
|
||||||
* config/rs6000/darwin.md (load_macho_picbase): Use link register
|
* config/rs6000/darwin.md (load_macho_picbase): Use link register
|
||||||
|
|
|
@ -890,6 +890,17 @@ div_if_zero_remainder (enum tree_code code, tree arg1, tree arg2)
|
||||||
|
|
||||||
int1l = TREE_INT_CST_LOW (arg1);
|
int1l = TREE_INT_CST_LOW (arg1);
|
||||||
int1h = TREE_INT_CST_HIGH (arg1);
|
int1h = TREE_INT_CST_HIGH (arg1);
|
||||||
|
/* &obj[0] + -128 really should be compiled as &obj[-8] rahter than
|
||||||
|
&obj[some_exotic_number]. */
|
||||||
|
if (POINTER_TYPE_P (type))
|
||||||
|
{
|
||||||
|
uns = false;
|
||||||
|
type = signed_type_for (type);
|
||||||
|
fit_double_type (int1l, int1h, &int1l, &int1h,
|
||||||
|
type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fit_double_type (int1l, int1h, &int1l, &int1h, type);
|
||||||
int2l = TREE_INT_CST_LOW (arg2);
|
int2l = TREE_INT_CST_LOW (arg2);
|
||||||
int2h = TREE_INT_CST_HIGH (arg2);
|
int2h = TREE_INT_CST_HIGH (arg2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue