From b91b26c962cc51f3f1058aceb4de20b31f100c8c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 3 Feb 1997 20:51:21 +0000 Subject: [PATCH] sol2.h (ASM_SHORT,ASM_LONG): Set to .uahalf/.uaword. * sparc/sol2.h (ASM_SHORT,ASM_LONG): Set to .uahalf/.uaword. * sparc/sysv4.h (ASM_LONG): Define. (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Use ASM_LONG. From-SVN: r13602 --- gcc/config/sparc/sol2.h | 7 +++++++ gcc/config/sparc/sysv4.h | 18 +++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index ec2e48a1eb1..fca28be7b11 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -74,6 +74,13 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.skip %u\n", (SIZE)) +/* Use .uahalf/.uaword so packed structure members don't generate + assembler errors when using the native assembler. */ +#undef ASM_SHORT +#define ASM_SHORT ".uahalf" +#undef ASM_LONG +#define ASM_LONG ".uaword" + /* This is how to output a definition of an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 48b530f26da..4dfde2af3d0 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -96,6 +96,10 @@ Boston, MA 02111-1307, USA. */ #define PUSHSECTION_ASM_OP ".pushsection" #define POPSECTION_ASM_OP ".popsection" +/* This is defined in sparc.h but is not used by svr4.h. */ +#undef ASM_LONG +#define ASM_LONG ".long" + /* This is the format used to print the second operand of a .type pseudo-op for the Sparc/svr4 assembler. */ @@ -202,7 +206,7 @@ do { \ #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { long value; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \ - fprintf((FILE), "\t.long\t0x%x\n", value); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value); \ } while (0) /* This is how to output assembly code to define a `double' constant. @@ -214,8 +218,8 @@ do { long value; \ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { long value[2]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \ - fprintf((FILE), "\t.long\t0x%x\n", value[0]); \ - fprintf((FILE), "\t.long\t0x%x\n", value[1]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[0]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[1]); \ } while (0) /* This is how to output an assembler line defining a `long double' @@ -225,10 +229,10 @@ do { long value[2]; \ #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ do { long value[4]; \ REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \ - fprintf((FILE), "\t.long\t0x%x\n", value[0]); \ - fprintf((FILE), "\t.long\t0x%x\n", value[1]); \ - fprintf((FILE), "\t.long\t0x%x\n", value[2]); \ - fprintf((FILE), "\t.long\t0x%x\n", value[3]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[0]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[1]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[2]); \ + fprintf((FILE), "\t%s\t0x%x\n", ASM_LONG, value[3]); \ } while (0) /* Output assembler code to FILE to initialize this source file's -- 2.30.2