summaryrefslogtreecommitdiff
path: root/gcc/config/elxsi/elxsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/elxsi/elxsi.c')
-rw-r--r--gcc/config/elxsi/elxsi.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/config/elxsi/elxsi.c b/gcc/config/elxsi/elxsi.c
index 7e8a24c1205..c2b9c57e2d5 100644
--- a/gcc/config/elxsi/elxsi.c
+++ b/gcc/config/elxsi/elxsi.c
@@ -42,10 +42,20 @@ static const char *const cmp_tab[] = {
"gt", "gt", "eq", "eq", "ge", "ge", "lt", "lt", "ne", "ne",
"le", "le" };
+static bool elxsi_assemble_integer PARAMS ((rtx, unsigned int, int));
static void elxsi_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
/* Initialize the GCC target structure. */
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP NULL
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP NULL
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP NULL
+#undef TARGET_ASM_INTEGER
+#define TARGET_ASM_INTEGER elxsi_assemble_integer
+
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE elxsi_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
@@ -53,6 +63,30 @@ static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
struct gcc_target targetm = TARGET_INITIALIZER;
+/* Target hook for assembling integer objects. The ELXSI assembler
+ syntax uses a suffix to indicate the size of data, so we can't use
+ the usual string hooks. */
+
+static bool
+elxsi_assemble_integer (x, size, aligned_p)
+ rtx x;
+ unsigned int size;
+ int aligned_p;
+{
+ if (aligned_p)
+ switch (size)
+ {
+ case 1:
+ case 2:
+ case 4:
+ fputs ("\t.data\t", asm_out_file);
+ output_addr_const (asm_out_file, x);
+ fprintf (asm_out_file, "{%d}\n", size * BITS_PER_UNIT);
+ return true;
+ }
+ return default_assemble_integer (x, size, aligned_p);
+}
+
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of
temporary storage to allocate.