aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@gcc.gnu.org>1999-09-02 05:42:06 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>1999-09-02 05:42:06 +0000
commitefa3896ad4081aa6ac08cd2ae187358025ea332f (patch)
treecf350d8b774148d6d50825f13215d512eb51e997 /gcc/varasm.c
parente075ae69f9d1263e78376038ab138c03e279f391 (diff)
downloadgcc-efa3896ad4081aa6ac08cd2ae187358025ea332f.zip
gcc-efa3896ad4081aa6ac08cd2ae187358025ea332f.tar.gz
gcc-efa3896ad4081aa6ac08cd2ae187358025ea332f.tar.bz2
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log, align_jumps, align_jumps_log, align_labels, align_labels_log, align_functions, align_functions_log. * toplev.c: Define them. (f_options): Handle -falign-* when they have no argument. (main): Add logic to set variables for -falign-functions, -falign-jumps, -falign-labels, -falign-loops. Make it -fsched-verbose=<n> and -finline-limit=<n>. (display_help): Change help to match options. * final.c (LABEL_ALIGN): Default to align_labels_log. (LABEL_ALIGN_MAX_SKIP): Default to align_labels-1. (LOOP_ALIGN): Default to align_loops_log. (LOOP_ALIGN_MAX_SKIP): Default to align_loops-1. (LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log. (LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1. * varasm.c (assemble_start_function): Handle align_functions. * config/sparc/sparc.h: Don't declare sparc_align_*. Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN. (DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into sparc.c. (FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request, it's a promise. * config/sparc/sparc.c: Delete sparc_align_loops, sparc_align_jumps, sparc_align_funcs and the corresponding string variables. (sparc_override_options): Default align_functions on ultrasparc. Delete -malign-* handling. * config/mips/mips.c (override_options): On 64-bit targets, try to align code to 64-bit boundaries. (print_operand): New substitution, %~, which aligns labels to align_labels_log. * config/mips/mips.md (div_trap_normal): Use %~. (div_trap_mips16): Likewise. (abssi): Likewise. (absdi2): Likewise. (ffssi2): Likewise. (ffsdi2): Likewise. (ashldi3_internal): Likewise. (ashrdi3_internal): Likewise. (lshrdi3_internal): Likewise. (casesi_internal): Likewise. Plus corresponding documentation changes. From-SVN: r29045
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 944d1bb..7110a2e 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -979,6 +979,19 @@ assemble_start_function (decl, fnname)
if (align > 0)
ASM_OUTPUT_ALIGN (asm_out_file, align);
+ /* Handle a user-specified function alignment.
+ Note that we still need to align to FUNCTION_BOUNDARY, as above,
+ because ASM_OUTPUT_MAX_SKIP_ALIGN might not do any alignment at all. */
+ if (align_functions_log > align)
+ {
+#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
+ ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file,
+ align_functions_log, align_functions-1);
+#else
+ ASM_OUTPUT_ALIGN (asm_out_file, align_functions_log);
+#endif
+ }
+
#ifdef ASM_OUTPUT_FUNCTION_PREFIX
ASM_OUTPUT_FUNCTION_PREFIX (asm_out_file, fnname);
#endif