or1k.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. diff -Nur gcc-9.2.0.orig/gcc/config/or1k/constraints.md gcc-9.2.0/gcc/config/or1k/constraints.md
  2. --- gcc-9.2.0.orig/gcc/config/or1k/constraints.md 2019-01-01 13:31:55.000000000 +0100
  3. +++ gcc-9.2.0/gcc/config/or1k/constraints.md 2019-10-07 10:59:48.995389485 +0200
  4. @@ -32,6 +32,9 @@
  5. (define_register_constraint "c" "SIBCALL_REGS"
  6. "Registers which can hold a sibling call address")
  7. +(define_register_constraint "t" "GOT_REGS"
  8. + "Registers which can be used to store the Global Offset Table (GOT) address.")
  9. +
  10. ;; Immediates
  11. (define_constraint "I"
  12. "A signed 16-bit immediate in the range -32768 to 32767."
  13. diff -Nur gcc-9.2.0.orig/gcc/config/or1k/or1k.h gcc-9.2.0/gcc/config/or1k/or1k.h
  14. --- gcc-9.2.0.orig/gcc/config/or1k/or1k.h 2019-01-01 13:31:55.000000000 +0100
  15. +++ gcc-9.2.0/gcc/config/or1k/or1k.h 2019-10-07 12:14:41.334692831 +0200
  16. @@ -189,6 +189,7 @@
  17. {
  18. NO_REGS,
  19. SIBCALL_REGS,
  20. + GOT_REGS,
  21. GENERAL_REGS,
  22. FLAG_REGS,
  23. ALL_REGS,
  24. @@ -200,6 +201,7 @@
  25. #define REG_CLASS_NAMES { \
  26. "NO_REGS", \
  27. "SIBCALL_REGS", \
  28. + "GOT_REGS", \
  29. "GENERAL_REGS", \
  30. "FLAG_REGS", \
  31. "ALL_REGS" }
  32. @@ -212,6 +214,7 @@
  33. #define REG_CLASS_CONTENTS \
  34. { { 0x00000000, 0x00000000 }, \
  35. { SIBCALL_REGS_MASK, 0 }, \
  36. + { 0xfffffdff, 0x00000000 }, \
  37. { 0xffffffff, 0x00000003 }, \
  38. { 0x00000000, 0x00000004 }, \
  39. { 0xffffffff, 0x00000007 } \
  40. diff -Nur gcc-9.2.0.orig/gcc/config/or1k/or1k.md gcc-9.2.0/gcc/config/or1k/or1k.md
  41. --- gcc-9.2.0.orig/gcc/config/or1k/or1k.md 2019-01-01 13:31:55.000000000 +0100
  42. +++ gcc-9.2.0/gcc/config/or1k/or1k.md 2019-10-07 10:59:48.999389485 +0200
  43. @@ -595,7 +595,7 @@
  44. ;; set_got pattern below. This works because the set_got_tmp insn is the
  45. ;; first insn in the stream and that it isn't moved during RA.
  46. (define_insn "set_got_tmp"
  47. - [(set (match_operand:SI 0 "register_operand" "=r")
  48. + [(set (match_operand:SI 0 "register_operand" "=t")
  49. (unspec_volatile:SI [(const_int 0)] UNSPECV_SET_GOT))]
  50. ""
  51. {
  52. @@ -604,7 +604,7 @@
  53. ;; The insn to initialize the GOT.
  54. (define_insn "set_got"
  55. - [(set (match_operand:SI 0 "register_operand" "=r")
  56. + [(set (match_operand:SI 0 "register_operand" "=t")
  57. (unspec:SI [(const_int 0)] UNSPEC_SET_GOT))
  58. (clobber (reg:SI LR_REGNUM))]
  59. ""