Define MAX_CODE_ALIGN globally.
authorMartin Liska <mliska@suse.cz>
Tue, 17 Jul 2018 09:21:41 +0000 (11:21 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 17 Jul 2018 09:21:41 +0000 (09:21 +0000)
2018-07-17  Martin Liska  <mliska@suse.cz>

* align.h (MAX_CODE_ALIGN): New.
(MAX_CODE_ALIGN_VALUE): New.
* common/config/i386/i386-common.c (ix86_handle_option):
(MAX_CODE_ALIGN): Moved to align.h.
* final.c (MAX_CODE_ALIGN): Likewise.
* opts.c (parse_and_check_align_values):
(MAX_CODE_ALIGN): Likewise.
(MAX_CODE_ALIGN_VALUE): Likewise.

From-SVN: r262806

gcc/ChangeLog
gcc/align.h
gcc/common/config/i386/i386-common.c
gcc/final.c
gcc/opts.c

index fe754fa..ccc824c 100644 (file)
@@ -1,5 +1,16 @@
 2018-07-17  Martin Liska  <mliska@suse.cz>
 
+       * align.h (MAX_CODE_ALIGN): New.
+       (MAX_CODE_ALIGN_VALUE): New.
+       * common/config/i386/i386-common.c (ix86_handle_option):
+       (MAX_CODE_ALIGN): Moved to align.h.
+       * final.c (MAX_CODE_ALIGN): Likewise.
+       * opts.c (parse_and_check_align_values):
+       (MAX_CODE_ALIGN): Likewise.
+       (MAX_CODE_ALIGN_VALUE): Likewise.
+
+2018-07-17  Martin Liska  <mliska@suse.cz>
+
        * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
         in order to fulfil coding style.
        * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
index 5a5d6c7..9acce47 100644 (file)
@@ -74,3 +74,7 @@ struct align_flags
 
   align_flags_tuple levels[2];
 };
+
+/* Define maximum supported code alignment.  */
+#define MAX_CODE_ALIGN 16
+#define MAX_CODE_ALIGN_VALUE (1 << MAX_CODE_ALIGN)
index 277ee55..70b3c3f 100644 (file)
@@ -1318,9 +1318,6 @@ ix86_handle_option (struct gcc_options *opts,
       return true;
 
 
-  /* Comes from final.c -- no real reason to change it.  */
-#define MAX_CODE_ALIGN 16
-
     case OPT_malign_loops_:
       warning_at (loc, 0, "-malign-loops is obsolete, use -falign-loops");
       if (value > MAX_CODE_ALIGN)
index 59eb75c..445a3fe 100644 (file)
@@ -842,7 +842,6 @@ shorten_branches (rtx_insn *first)
   rtx_insn *insn;
   int max_uid;
   int i;
-#define MAX_CODE_ALIGN 16
   rtx_insn *seq;
   int something_changed = 1;
   char *varying_length;
index e536607..0625b15 100644 (file)
@@ -1805,10 +1805,6 @@ parse_and_check_align_values (const char *flag,
       return false;
     }
 
-  /* Comes from final.c -- no real reason to change it.  */
-#define MAX_CODE_ALIGN 16
-#define MAX_CODE_ALIGN_VALUE (1 << MAX_CODE_ALIGN)
-
   for (unsigned i = 0; i < result_values.length (); i++)
     if (result_values[i] > MAX_CODE_ALIGN_VALUE)
       {