You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.7 KiB

  1. commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a
  2. Author: Felix Fietkau <nbd@openwrt.org>
  3. Date: Tue May 6 11:49:05 2014 +0000
  4. gcc: revert an upstream patch that is causing a regression on powerpc
  5. https://forum.openwrt.org/viewtopic.php?pid=232494#p232494
  6. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  7. SVN-Revision: 40709
  8. Revert of:
  9. commit 275035b56823b26d5fb7e90fad945b998648edf2
  10. Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>
  11. Date: Thu Sep 5 14:09:07 2013 +0000
  12. PR target/58139
  13. * reginfo.c (choose_hard_reg_mode): Scan through all mode classes
  14. looking for widest mode.
  15. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4
  16. --- a/gcc/reginfo.c
  17. +++ b/gcc/reginfo.c
  18. @@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno
  19. mode = GET_MODE_WIDER_MODE (mode))
  20. if ((unsigned) hard_regno_nregs[regno][mode] == nregs
  21. && HARD_REGNO_MODE_OK (regno, mode)
  22. - && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
  23. - && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
  24. + && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
  25. found_mode = mode;
  26. + if (found_mode != VOIDmode)
  27. + return found_mode;
  28. +
  29. for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
  30. mode != VOIDmode;
  31. mode = GET_MODE_WIDER_MODE (mode))
  32. if ((unsigned) hard_regno_nregs[regno][mode] == nregs
  33. && HARD_REGNO_MODE_OK (regno, mode)
  34. - && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
  35. - && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
  36. + && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
  37. found_mode = mode;
  38. + if (found_mode != VOIDmode)
  39. + return found_mode;
  40. +
  41. for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
  42. mode != VOIDmode;
  43. mode = GET_MODE_WIDER_MODE (mode))
  44. if ((unsigned) hard_regno_nregs[regno][mode] == nregs
  45. && HARD_REGNO_MODE_OK (regno, mode)
  46. - && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
  47. - && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
  48. + && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
  49. found_mode = mode;
  50. + if (found_mode != VOIDmode)
  51. + return found_mode;
  52. +
  53. for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
  54. mode != VOIDmode;
  55. mode = GET_MODE_WIDER_MODE (mode))
  56. if ((unsigned) hard_regno_nregs[regno][mode] == nregs
  57. && HARD_REGNO_MODE_OK (regno, mode)
  58. - && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
  59. - && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
  60. + && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
  61. found_mode = mode;
  62. if (found_mode != VOIDmode)