200x-xx-xx Richard Sandiford <richard@codesourcery.com> Nathan Sidwell <nathan@codeso...
authorRichard Sandiford <richard@codesourcery.com>
Thu, 18 Jan 2007 19:12:34 +0000 (19:12 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 18 Jan 2007 19:12:34 +0000 (19:12 +0000)
gcc/
200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
    Nathan Sidwell  <nathan@codesourcery.com>

* config/m68k/m68k.h (PCC_STATIC_STRUCT_RETURN): Delete.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Add MOTOROLA cases.
* config/m68k/coff.h (REGISTER_PREFIX_MD): Delete.
* config/m68k/m68020-elf.h (LIB_SPEC): Delete.
* config/m68k/m68k-none.h (CC1_SPEC, CPP_SUBTARGET_SPEC): Delete.
* config/m68k/m68kelf.h (IMMEDIATE_PREFIX, REGISTER_PREFIX_MD)
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete.
(NO_DOLLAR_IN_LABEL, PCC_STATIC_STRUCT_RETURN): Don't undefine.
(BSS_ASM_OP, ASM_OUTPUT_SKIP, ASM_OUTPUT_ASCII): Delete.
* config/m68k/m68kemb.h (PCC_STATIC_STRUCT_RETURN): Don't undefine.
* config/m68k/linux.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE)
(WCHAR_TYPE_SIZE, TARGET_OBJFMT_CPP_BUILTINS): Delete.
(TARGET_OS_CPP_BUILTINS): Don't define mc68000 and mc68020 here.
(DBX_REGISTER_NUMBER): Delete.
* config/m68k/netbsd-elf.h (IMMEDIATE_PREFIX): Delete.
(PCC_STATIC_STRUCT_RETURN): Don't undefine.
* config/m68k/openbsd.h (PCC_STATIC_STRUCT_RETURN): Define.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
From-SVN: r120913

gcc/ChangeLog
gcc/config/m68k/coff.h
gcc/config/m68k/linux.h
gcc/config/m68k/m68020-elf.h
gcc/config/m68k/m68k-none.h
gcc/config/m68k/m68k.h
gcc/config/m68k/m68kelf.h
gcc/config/m68k/m68kemb.h
gcc/config/m68k/netbsd-elf.h
gcc/config/m68k/openbsd.h

index 3643673af4a46603907576a219918fcd9a6d9c98..d8009592af1ff18ec80d56584c2da78a58edfb21 100644 (file)
@@ -1,3 +1,24 @@
+2007-01-18  Richard Sandiford  <richard@codesourcery.com>
+           Nathan Sidwell  <nathan@codesourcery.com>
+
+       * config/m68k/m68k.h (PCC_STATIC_STRUCT_RETURN): Delete.
+       (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Add MOTOROLA cases.
+       * config/m68k/coff.h (REGISTER_PREFIX_MD): Delete.
+       * config/m68k/m68020-elf.h (LIB_SPEC): Delete.
+       * config/m68k/m68k-none.h (CC1_SPEC, CPP_SUBTARGET_SPEC): Delete.
+       * config/m68k/m68kelf.h (IMMEDIATE_PREFIX, REGISTER_PREFIX_MD)
+       (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete.
+       (NO_DOLLAR_IN_LABEL, PCC_STATIC_STRUCT_RETURN): Don't undefine.
+       (BSS_ASM_OP, ASM_OUTPUT_SKIP, ASM_OUTPUT_ASCII): Delete.
+       * config/m68k/m68kemb.h (PCC_STATIC_STRUCT_RETURN): Don't undefine.
+       * config/m68k/linux.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE)
+       (WCHAR_TYPE_SIZE, TARGET_OBJFMT_CPP_BUILTINS): Delete.
+       (TARGET_OS_CPP_BUILTINS): Don't define mc68000 and mc68020 here.
+       (DBX_REGISTER_NUMBER): Delete.
+       * config/m68k/netbsd-elf.h (IMMEDIATE_PREFIX): Delete.
+       (PCC_STATIC_STRUCT_RETURN): Don't undefine.
+       * config/m68k/openbsd.h (PCC_STATIC_STRUCT_RETURN): Define.
+
 2007-01-18  Richard Sandiford  <richard@codesourcery.com>
 
        * config.gcc (m68k-*-uclinux*): Add flat.h to $tm_file.
index 7bc0daacded505519cdb2269446e5c670b02622d..14090cd5729f0bde1eebb71e02cec54114c42e26 100644 (file)
@@ -46,12 +46,6 @@ Boston, MA 02110-1301, USA.  */
 #undef REGISTER_PREFIX
 #define REGISTER_PREFIX "%"
 
-/* In the machine description we can't use %R, because it will not be seen
-   by ASM_FPRINTF.  (Isn't that a design bug?).  */
-
-#undef REGISTER_PREFIX_MD
-#define REGISTER_PREFIX_MD "%%"
-
 /* config/m68k.md has an explicit reference to the program counter,
    prefix this by the register prefix.  */
 
index b1f9e9771c8941ee99b51f2c327279ad44f66aff..897410f383d886bce7b351efb9d628d5f99b1d72 100644 (file)
@@ -58,34 +58,8 @@ Boston, MA 02110-1301, USA.  */
 
 #define ASM_COMMENT_START "|"
 
-#undef SIZE_TYPE
-#define SIZE_TYPE "unsigned int"
-
-#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "int"
-
-#undef WCHAR_TYPE
-#define WCHAR_TYPE "long int"
-
-#undef WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE BITS_PER_WORD
-
 /* Target OS builtins.  */
-#define TARGET_OS_CPP_BUILTINS()               \
-  do                                           \
-    {                                          \
-       LINUX_TARGET_OS_CPP_BUILTINS();         \
-       builtin_define_std ("mc68000");         \
-       builtin_define_std ("mc68020");         \
-   }                                           \
-  while (0)
-
-#define TARGET_OBJFMT_CPP_BUILTINS()           \
-  do                                           \
-    {                                          \
-       builtin_define ("__ELF__");             \
-    }                                          \
-  while (0)
+#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
 
 #undef CPP_SPEC
 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
@@ -175,12 +149,6 @@ Boston, MA 02110-1301, USA.  */
     fprintf (FILE, "\tjbsr _mcount\n");                                        \
 }
 
-/* How to renumber registers for dbx and gdb.
-   On the Sun-3, the floating point registers have numbers
-   18 to 25, not 16 to 23 as they do in the compiler.  */
-
-#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 16 ? (REGNO) : (REGNO) + 2)
-
 /* Do not break .stabs pseudos into continuations.  */
 
 #define DBX_CONTIN_LENGTH 0
index 9dfcdc61cfb5f7c242f998517437ae2371249bd9..7cd44eb9d61ae5646a8fa6a9503c7516f2e22ec8 100644 (file)
@@ -28,6 +28,4 @@ Boston, MA 02110-1301, USA.  */
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "crtbegin.o%s"
 
-#define LIB_SPEC "-lc"
-
 /* end of m68020-elf.h */
index 6b30389e9c33d07232d28407faee503db6660cf8..15ad022ce7200b7a42387d4017e017508ed1ac5a 100644 (file)
@@ -21,12 +21,3 @@ Boston, MA 02110-1301, USA.  */
 #undef ASM_SPEC
 #define ASM_SPEC "%(asm_cpu_spec) %{fPIC:--pcrel} %{fpic:--pcrel} \
  %{msep-data:--pcrel} %{mid-shared-library:--pcrel}"
-
-/* cc1/cc1plus always receives all the -m flags. If the specs strings above 
-   are consistent with the flags in m68k.opt, there should be no need for
-   any further cc1/cc1plus specs.  */
-
-#undef CC1_SPEC
-#define CC1_SPEC ""
-
-#define CPP_SUBTARGET_SPEC ""
index 7b3a74c4ba3380d3e9c306c8e5dac531bd4523e6..1d8b4ae48a399fed3326b45a358caff53185e461 100644 (file)
@@ -625,8 +625,6 @@ extern enum reg_class regno_reg_class[];
    XXX This macro is m68k specific and used only for m68kemb.h.  */
 #define NEEDS_UNTYPED_CALL 0
 
-#define PCC_STATIC_STRUCT_RETURN
-
 /* On the m68k, all arguments are usually pushed on the stack.  */
 #define FUNCTION_ARG_REGNO_P(N) 0
 \f
@@ -1127,10 +1125,17 @@ do { if (cc_prev_status.flags & CC_IN_68881)                    \
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
   sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM))
 
-#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
-  asm_fprintf (FILE, "\tmovel %s,%Rsp@-\n", reg_names[REGNO])
-#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
-  asm_fprintf (FILE, "\tmovel %Rsp@+,%s\n", reg_names[REGNO])
+#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)                        \
+  asm_fprintf (FILE, (MOTOROLA                         \
+                     ? "\tmove.l %s,-(%Rsp)\n"         \
+                     : "\tmovel %s,%Rsp@-\n"),         \
+              reg_names[REGNO])
+
+#define ASM_OUTPUT_REG_POP(FILE,REGNO)                 \
+  asm_fprintf (FILE, (MOTOROLA                         \
+                     ? "\tmove.l (%Rsp)+,%s\n"         \
+                     : "\tmovel %Rsp@+,%s\n"),         \
+              reg_names[REGNO])
 
 /* The m68k does not use absolute case-vectors, but we must define this macro
    anyway.  */
index 755c0e19982596d25809f6e63b4c418417a8708a..ecdbd508ed01934addab53c9cfd39773b7e0438f 100644 (file)
@@ -28,7 +28,7 @@ Boston, MA 02110-1301, USA.  */
 #define SWBEG_ASM_OP "\t.swbeg\t"
 #endif
 
-/* Here are four prefixes that are used by asm_fprintf to
+/* Here are three prefixes that are used by asm_fprintf to
    facilitate customization for alternate assembler syntaxes.
    Machines with no likelihood of an alternate syntax need not
    define these and need not use asm_fprintf.  */
@@ -51,17 +51,6 @@ Boston, MA 02110-1301, USA.  */
 #undef USER_LABEL_PREFIX
 #define USER_LABEL_PREFIX ""
 
-/* The prefix for immediate operands.  */
-
-#undef  IMMEDIATE_PREFIX
-#define IMMEDIATE_PREFIX "#"
-
-/* In the machine description we can't use %R, because it will not be seen
-   by ASM_FPRINTF.  (Isn't that a design bug?).  */
-
-#undef REGISTER_PREFIX_MD
-#define REGISTER_PREFIX_MD "%%"
-
 /* config/m68k.md has an explicit reference to the program counter,
    prefix this by the register prefix.  */
 
@@ -88,39 +77,6 @@ do {                                                         \
     fprintf ((FILE), "%s%u\n", ALIGN_ASM_OP, 1 << (LOG));      \
 } while (0)
 
-/* Use proper assembler syntax for these macros.  */
-#undef ASM_OUTPUT_REG_PUSH
-#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
-  asm_fprintf (FILE, "\t%Omove.l %s,-(%Rsp)\n", reg_names[REGNO])
-
-#undef ASM_OUTPUT_REG_POP
-#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
-  asm_fprintf (FILE, "\t%Omove.l (%Rsp)+,%s\n", reg_names[REGNO])
-
-/*  Override the definition of NO_DOLLAR_IN_LABEL in svr4.h, for special
-    g++ assembler names.  When this is defined, g++ uses embedded '.'
-    characters and some m68k assemblers have problems with this.  The
-    chances are much greater that any particular assembler will permit
-    embedded '$' characters.  */
-
-#undef NO_DOLLAR_IN_LABEL
-
-/* Define PCC_STATIC_STRUCT_RETURN if the convention on the target machine
-   is to use the nonreentrant technique for returning structure and union
-   values, as commonly implemented by the AT&T Portable C Compiler (PCC).
-   When defined, the gcc option -fpcc-struct-return can be used to cause
-   this form to be generated.  When undefined, the option does nothing.
-   For m68k SVR4, the convention is to use a reentrant technique compatible
-   with the gcc default, so override the definition of this macro in m68k.h */
-
-#undef PCC_STATIC_STRUCT_RETURN
-
-/* Local common symbols are declared to the assembler with ".lcomm" rather
-   than ".bss", so override the definition in svr4.h */
-
-#undef BSS_ASM_OP
-#define BSS_ASM_OP     "\t.lcomm\t"
-
 /* Register in which address to store a structure value is passed to a
    function.  The default in m68k.h is a1.  For m68k/SVR4 it is a0.  */
 
@@ -137,16 +93,6 @@ do {                                                                \
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
 
-/* The ASM_OUTPUT_SKIP macro is first defined in m68k.h, using ".skip".
-   It is then overridden by m68k/sgs.h to use ".space", and again by svr4.h
-   to use ".zero".  The m68k/SVR4 assembler uses ".space", so repeat the
-   definition from m68k/sgs.h here.  Note that ASM_NO_SKIP_IN_TEXT is
-   defined in m68k/sgs.h, so we don't have to repeat it here.  */
-
-#undef ASM_OUTPUT_SKIP
-#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
-  fprintf (FILE, "%s%u\n", SPACE_ASM_OP, (int)(SIZE))
-
 #if 0
 /* SVR4 m68k assembler is bitching on the `comm i,1,1' which askes for 
    1 byte alignment. Don't generate alignment for COMMON seems to be
@@ -156,39 +102,6 @@ do {                                                               \
 #undef ASM_OUTPUT_ALIGNED_LOCAL
 #endif
 
-/* The `string' directive on m68k svr4 does not handle string with
-   escape char (i.e., `\') right. Use normal way to output ASCII bytes
-   seems to be safer.  */
-#undef ASM_OUTPUT_ASCII
-#define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                         \
-do {                                                           \
-  register int sp = 0, ch;                                     \
-  fputs (integer_asm_op (1, TRUE), (FILE));                    \
-  do {                                                         \
-    ch = (PTR)[sp];                                            \
-    if (ch > ' ' && ! (ch & 0x80) && ch != '\\')               \
-      {                                                                \
-       fprintf ((FILE), "'%c", ch);                            \
-      }                                                                \
-    else                                                       \
-      {                                                                \
-       fprintf ((FILE), "0x%x", ch);                           \
-      }                                                                \
-    if (++sp < (LEN))                                          \
-      {                                                                \
-       if ((sp % 10) == 0)                                     \
-         {                                                     \
-           fprintf ((FILE), "\n%s", integer_asm_op (1, TRUE)); \
-         }                                                     \
-       else                                                    \
-         {                                                     \
-           putc (',', (FILE));                                 \
-         }                                                     \
-      }                                                                \
-  } while (sp < (LEN));                                                \
-  putc ('\n', (FILE));                                         \
-} while (0)
-
 #undef ASM_OUTPUT_COMMON
 #undef ASM_OUTPUT_LOCAL
 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
index f7beb90b0af2defc8c4a680e7cb7ff0f7ce71e64..3ada8a96926027637c2cc09ea38711fd30e5a430 100644 (file)
    so we define PCC_BITFIELD_TYPE_MATTERS.  */
 #define PCC_BITFIELD_TYPE_MATTERS 1
 
-/* Undef PCC_STATIC_STRUCT_RETURN so that we get a re-entrant calling
-   convention.  */
-#undef PCC_STATIC_STRUCT_RETURN
-
 /* Don't default to pcc-struct-return, so that we can return small structures
    and unions in registers, which is slightly more efficient.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0
index e37bea0a6290e030146c204f2b18e4140062f991..234d017aa799163c2c928c88cf38a0778f05aebf 100644 (file)
@@ -134,12 +134,6 @@ while (0)
 #define USER_LABEL_PREFIX ""
 
 
-/* The prefix for immediate operands.  */
-
-#undef IMMEDIATE_PREFIX
-#define IMMEDIATE_PREFIX "#"
-
-
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START "|"
 
@@ -329,12 +323,6 @@ while (0)
 #define BIGGEST_ALIGNMENT 64
 
 
-/* For m68k SVR4, structures are returned using the reentrant
-   technique.  */
-
-#undef PCC_STATIC_STRUCT_RETURN
-
-
 /* The svr4 ABI for the m68k says that records and unions are returned
    in memory.  */
 
index 2bc0af5ec19526bdd01f69772f07e1a933d52939..2cedf96902477c57ef55ed263c9c18338793f2dc 100644 (file)
@@ -73,6 +73,10 @@ Boston, MA 02110-1301, USA.  */
 
 /* Stack & calling: aggregate returns.  */
 
+/* ??? This is traditional, but quite possibly wrong.  It appears to
+   disagree with gdb.  */
+#define PCC_STATIC_STRUCT_RETURN 1
+
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
    we want to retain compatibility with older gcc versions.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0