/* Definitions of target machine for GNU compiler. "embedded" 68XXX.
This is meant to be included after m68k.h.
- Copyright (C) 1994, 1995 Free Software Foundation, Inc. */
+ Copyright (C) 1994-2022 Free Software Foundation, Inc. */
+
+/* Override the SVR4 ABI for this target. */
#define PTRDIFF_TYPE "long int"
#define SIZE_TYPE "long unsigned int"
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
-/* Return floating point values in a fp register. This make fp code a
- little bit faster. It also makes -msoft-float code incompatible with
- -m68881 code, so people have to be careful not to mix the two. */
#undef FUNCTION_VALUE
#define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE))
#undef LIBCALL_VALUE
-#define LIBCALL_VALUE(MODE) \
- gen_rtx (REG, (MODE), \
- ((TARGET_68881 \
- && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)) \
- ? 16 : 0))
+#define LIBCALL_VALUE(MODE) \
+ m68k_libcall_value (MODE)
#undef FUNCTION_VALUE_REGNO_P
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16))
+#define FUNCTION_VALUE_REGNO_P(N) \
+ ((N) == D0_REG || (TARGET_68881 && (N) == FP0_REG))
#undef NEEDS_UNTYPED_CALL
#define NEEDS_UNTYPED_CALL 1
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dmc68000 -D__embedded__ -Asystem(embedded) \
- -Amachine(mc68000)"
-
-#undef LINK_SPEC
-#define LINK_SPEC "\
- %{midp: %{!Ttext*: -Ttext 0x00010000}} \
- %{mbcc: %{!Ttext*: -Ttext 0x00003000}} \
- %{mmvme135: %{!Ttext*: -Ttext 0x00005000}} \
- %{mmvme162: %{!Ttext*: -Ttext 0x00010000}}"
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__embedded__"); \
+ } \
+ while (0)
-/* Use the target specific crt0 and libgloss/newlib libraries if desired */
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "\
- %{midp: idp-crt0.o} \
- %{mbcc: bcc-crt0.o} \
- %{mmvme135: mvme135-crt0.o} \
- %{mmvme162: mvme162-crt0.o}"
+/* Override the default LIB_SPEC from gcc.c. We don't currently support
+ profiling, or libg.a. */
#undef LIB_SPEC
-#define LIB_SPEC "\
- %{mmvme135: -lc -lmvme135 -lc} \
- %{mmvme162: -lc -lmvme162 -lc} \
- %{midp: -lc -lidp -lc} \
- %{mbcc: -lc -lbcc -lc}"
+#define LIB_SPEC "-lc"
+
+/* Make this be null, since we want the crt0.o to come from the linker
+ script */
-#undef SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES \
- { "mvme135", 0 }, \
- { "mvme162", 0 }, \
- { "bcc", 0}, \
- { "idp", 0 },
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC ""