From bc1ebe6373abe535f0d64cb2b17692fa16c285e0 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Tue, 4 May 1993 15:21:26 +0000 Subject: [PATCH] (ASM_OUTPUT_CASE_LABEL): Ensure jump table is aligned. From-SVN: r4320 --- gcc/config/sh/sh.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 0a75098b3b1..edf7e1f82d9 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1023,8 +1023,6 @@ extern int current_function_anonymous_args; #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%d:\n", PREFIX, NUM) -/* Nothing special is done about jump tables */ -/* #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) */ /* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */ /* Construct a private name. */ @@ -1032,6 +1030,10 @@ extern int current_function_anonymous_args; ((OUTVAR) = (char *) alloca (strlen (NAME) + 10), \ sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER))) +/* Jump tables must be 32 bit aligned. */ +#define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \ + fprintf (STREAM, "\t.align 2\n%s%d:\n", PREFIX, NUM); + /* Output a relative address. Not needed since jump tables are absolute but we must define it anyway. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL) \ -- 2.30.2