0004-gcc-Fix-for-64-bit-os.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. diff a/gcc/config/c33/c33.c b/gcc/config/c33/c33.c
  2. --- a/gcc/config/c33/c33.c 2009-10-28 10:54:46.000000000 +0800
  3. +++ b/gcc/config/c33/c33.c 2009-11-20 17:06:09.000000000 +0800
  4. @@ -547,7 +547,7 @@
  5. enum rtx_code c;
  6. {
  7. - HOST_WIDE_INT high, low;
  8. + //HOST_WIDE_INT high, low;
  9. switch (c)
  10. {
  11. case CONST_INT:
  12. @@ -984,7 +984,8 @@
  13. {
  14. const_double_split (x, &high, &low);
  15. - fprintf (file, "0x%lx", (long) high);
  16. + //fprintf (file, "0x%lx", (long) high);
  17. + fprintf (file, "0x%x", high);
  18. }
  19. else
  20. @@ -1271,6 +1272,12 @@
  21. HOST_WIDE_INT high_low[2];
  22. int i;
  23. rtx xop[10];
  24. +#if 1
  25. + high_low[0] = INTVAL (src) & ((1ULL << BITS_PER_WORD) - 1); // fix for 64 bit
  26. + //high_low[1] = INTVAL (src) >> BITS_PER_WORD; // might this be more correct than the line below
  27. + high_low[1] = ((INTVAL (src) & (1ULL << (BITS_PER_WORD - 1))) == 0) ? 0 : -1;
  28. +#else
  29. high_low[0] = INTVAL (src);
  30. high_low[1] = (INTVAL (src) >= 0) ? 0 : -1;
  31. +#endif
  32. for (i = 0; i < 2; i++)
  33. {