patch-gcc_config_alpha_alpha_c 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. $OpenBSD: patch-gcc_config_alpha_alpha_c,v 1.4 2013/06/07 07:54:23 pascal Exp $
  2. --- gcc/config/alpha/alpha.c.orig Thu Aug 9 23:49:40 2012
  3. +++ gcc/config/alpha/alpha.c Sat Apr 13 16:20:31 2013
  4. @@ -227,6 +227,10 @@ alpha_handle_option (size_t code, const char *arg, int
  5. target_flags |= MASK_IEEE_CONFORMANT;
  6. break;
  7. + case OPT_mno_ieee:
  8. + target_flags &= ~(MASK_IEEE_WITH_INEXACT|MASK_IEEE_CONFORMANT);
  9. + break;
  10. +
  11. case OPT_mtls_size_:
  12. if (value != 16 && value != 32 && value != 64)
  13. error ("bad value %qs for -mtls-size switch", arg);
  14. @@ -487,11 +491,17 @@ alpha_option_override (void)
  15. if (!global_options_set.x_g_switch_value)
  16. g_switch_value = 8;
  17. +#ifdef OPENBSD_NATIVE
  18. + /* Make -fpic behave as -fPIC unless -msmall-data is specified. */
  19. + if (flag_pic == 2 && TARGET_SMALL_DATA)
  20. + warning (0, "-fPIC used with -msmall-data");
  21. +#else
  22. /* Infer TARGET_SMALL_DATA from -fpic/-fPIC. */
  23. if (flag_pic == 1)
  24. target_flags |= MASK_SMALL_DATA;
  25. else if (flag_pic == 2)
  26. target_flags &= ~MASK_SMALL_DATA;
  27. +#endif
  28. /* Align labels and loops for optimal branching. */
  29. /* ??? Kludge these by not doing anything if we don't optimize and also if
  30. @@ -7823,6 +7833,9 @@ alpha_expand_prologue (void)
  31. sa_size = alpha_sa_size ();
  32. frame_size = compute_frame_size (get_frame_size (), sa_size);
  33. + if (warn_stack_larger_than && frame_size > stack_larger_than_size)
  34. + warning (OPT_Wstack_larger_than_, "stack usage is %d bytes", frame_size);
  35. +
  36. if (flag_stack_usage)
  37. current_function_static_stack_size = frame_size;
  38. @@ -7864,6 +7877,8 @@ alpha_expand_prologue (void)
  39. if (flag_stack_check)
  40. probed_size += STACK_CHECK_PROTECT;
  41. +if (flag_stack_check || STACK_CHECK_BUILTIN)
  42. + {
  43. if (probed_size <= 32768)
  44. {
  45. if (probed_size > 4096)
  46. @@ -7957,6 +7972,44 @@ alpha_expand_prologue (void)
  47. ? -frame_size + 64
  48. : -frame_size))));
  49. }
  50. + }
  51. + else
  52. + {
  53. + if (frame_size <= 32768)
  54. + {
  55. + if (frame_size != 0)
  56. + FRP (emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
  57. + GEN_INT (TARGET_ABI_UNICOSMK
  58. + ? -frame_size + 64
  59. + : -frame_size))));
  60. + }
  61. + else
  62. + {
  63. + rtx count = gen_rtx_REG (DImode, 23);
  64. + rtx seq;
  65. +
  66. + emit_move_insn (count, GEN_INT (TARGET_ABI_UNICOSMK
  67. + ? -frame_size + 64
  68. + : -frame_size));
  69. + seq = emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
  70. + count));
  71. +
  72. + /* This alternative is special, because the DWARF code cannot
  73. + possibly intuit through the loop above. So we invent this
  74. + note it looks at instead. */
  75. + RTX_FRAME_RELATED_P (seq) = 1;
  76. + REG_NOTES (seq)
  77. + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
  78. + gen_rtx_SET (VOIDmode, stack_pointer_rtx,
  79. + gen_rtx_PLUS (Pmode, stack_pointer_rtx,
  80. + GEN_INT (TARGET_ABI_UNICOSMK
  81. + ? -frame_size + 64
  82. + : -frame_size))),
  83. + REG_NOTES (seq));
  84. + }
  85. + }
  86. +
  87. +
  88. if (!TARGET_ABI_UNICOSMK)
  89. {