Commit 44ae13fb by Stan Cox

Support EXTRA_SPECS

From-SVN: r11690
parent 5717cc73
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GNU compiler.
Motorola m88100 running DG/UX. Motorola m88100 running DG/UX.
Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@mcc.com) Contributed by Michael Tiemann (tiemann@mcc.com)
Currently maintained by (gcc@dg-rtp.dg.com) Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
(TARGET_SVR4 ? DWARF_DEBUG : SDB_DEBUG) (TARGET_SVR4 ? DWARF_DEBUG : SDB_DEBUG)
#ifndef VERSION_INFO2 #ifndef VERSION_INFO2
#define VERSION_INFO2 "$Revision: 1.18 $" #define VERSION_INFO2 "$Revision: 1.20 $"
#endif #endif
#ifndef NO_BUGS #ifndef NO_BUGS
#define AS_BUG_IMMEDIATE_LABEL #define AS_BUG_IMMEDIATE_LABEL
...@@ -83,24 +83,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -83,24 +83,12 @@ Boston, MA 02111-1307, USA. */
-traditional, or restricting include files to one specific source -traditional, or restricting include files to one specific source
target, specify full DG/UX features. */ target, specify full DG/UX features. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \ #define CPP_SPEC "%(cpp_cpu)
%{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \
%{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}} \
%{msvr3:-D_M88KBCS_TARGET} %{!msvr3:-D_DGUX_TARGET}" %{msvr3:-D_M88KBCS_TARGET} %{!msvr3:-D_DGUX_TARGET}"
/* Assembler support (-V, silicon filter, legends for mxdb). */ /* Assembler support (-V, silicon filter, legends for mxdb). */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "\ #define ASM_SPEC "%(asm_cpu) %{!msvr3:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}"
%{V} %{v:%{!V:-V}} %{pipe:%{!.s: - }\
%{!msvr3:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}\
%{g:\
%{mno-legend:-Wc,off}\
%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
%{traditional:,-lc}%{!traditional:,-lansi-c}\
%{mstandard:,-keep-std}\
%{mkeep-coff:,-keep-coff}\
%{mexternal-legend:,-external}\
%{mocs-frame-position:,-ocs}}}"
/* Override svr4.h. */ /* Override svr4.h. */
#undef ASM_FINAL_SPEC #undef ASM_FINAL_SPEC
...@@ -126,14 +114,53 @@ Boston, MA 02111-1307, USA. */ ...@@ -126,14 +114,53 @@ Boston, MA 02111-1307, USA. */
%{symbolic:-Bsymbolic -G -dy} \ %{symbolic:-Bsymbolic -G -dy} \
%{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}" %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}"
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \ #define STARTFILE_SPEC "%(startfile_default)"
/* This macro defines names of additional specifications to put in the specs
that can be used in various specifications like CC1_SPEC. Its definition
is an initializer with a subgrouping for each command option.
Each subgrouping contains a string constant, that defines the
specification name, and a string constant that used by the GNU CC driver
program.
Do not define this macro if it does not need to do anything. */
#define EXTRA_SPECS \
{ "cpp_cpu", CPP_CPU_SPEC }, \
{ "asm_cpu", ASM_CPU_SPEC }, \
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
{ "startfile_crtbegin", STARTFILE_CRTBEGIN_SPEC }
#define ASM_CPU_SPEC "\
%{V} %{v:%{!V:-V}}
%{g:\
%{mno-legend:-Wc,off}\
%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
%{traditional:,-lc}\
%{!traditional:,-lansi-c}\
%{mstandard:,-keep-std}\
%{mexternal-legend:,-external}\
%{mocs-frame-position:,-ocs}}}"
#define CPP_CPU_SPEC "\
%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \
%{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \
%{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
#define STARTFILE_DEFAULT_SPEC "\
%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \
%{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \ %{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \
%{msvr3:m88kdgux.ld%s bcscrtbegin.o%s} \ %(startfile_crtbegin)
%{!msvr3:crtbegin.o%s} \
%{svr4:%{ansi:/lib/values-Xc.o} \ %{svr4:%{ansi:/lib/values-Xc.o} \
%{!ansi:%{traditional:/lib/values-Xt.o} \ %{!ansi:%{traditional:/lib/values-Xt.o} \
%{!traditional:/usr/lib/values-Xa.o}}}}}" %{!traditional:/usr/lib/values-Xa.o}}}}}"
#define STARTFILE_CRTBEGIN_SPEC "\
%{msvr3:m88kdgux.ld%s bcscrtbegin.o%s} \
%{!msvr3:crtbegin.o%s}"
#undef GPLUSPLUS_INCLUDE_DIR #undef GPLUSPLUS_INCLUDE_DIR
#define GPLUSPLUS_INCLUDE_DIR "/usr/opt/g++/lib/g++-include" #define GPLUSPLUS_INCLUDE_DIR "/usr/opt/g++/lib/g++-include"
......
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GNU compiler.
Motorola m88100 running DG/UX. Motorola m88100 running DG/UX.
Copyright (C) 1988, 89, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@mcc.com) Contributed by Michael Tiemann (tiemann@mcc.com)
Currently maintained by (gcc@dg-rtp.dg.com) Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -36,36 +36,25 @@ Boston, MA 02111-1307, USA. */ ...@@ -36,36 +36,25 @@ Boston, MA 02111-1307, USA. */
/* Assembler support (-V, silicon filter, legends for mxdb). */ /* Assembler support (-V, silicon filter, legends for mxdb). */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "\ #define ASM_SPEC "%(asm_cpu) %{msvr4:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}"
%{V} %{v:%{!V:-V}} %{pipe:%{!.s: - }\
%{msvr4:%{!m88110:-KV3 }%{m88110:-KV04.00 }}}\
%{!mlegend:%{mstandard:-Wc,off}}\
%{mlegend:-Wc,-fix-bb,-s\"%i\"\
%{traditional:,-lc}%{!traditional:,-lansi-c}\
%{mstandard:,-keep-std}\
%{mkeep-coff:,-keep-coff}\
%{mexternal-legend:,-external}\
%{mocs-frame-position:,-ocs}}"
/* If -m88100 is in effect, add -Dm88100; similarly for -m88110. /* If -m88100 is in effect, add -Dm88100; similarly for -m88110.
Here, the CPU_DEFAULT is assumed to be -m88000. If not -ansi, Here, the CPU_DEFAULT is assumed to be -m88000. If not -ansi,
-traditional, or restricting include files to one specific source -traditional, or restricting include files to one specific source
target, specify full DG/UX features. */ target, specify full DG/UX features. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \ #define CPP_SPEC "%(cpp_cpu)
%{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \
%{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}} \
%{!msvr4:-D_M88KBCS_TARGET} %{msvr4:-D_DGUX_TARGET}" %{!msvr4:-D_M88KBCS_TARGET} %{msvr4:-D_DGUX_TARGET}"
/* Linker and library spec's. /* Linker and library spec's.
-msvr3 is the default if -msvr4 is not specified. */ -msvr3 is the default if -msvr4 is not specified. */
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}" #define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}}"
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt0.o%s} \ #define STARTFILE_SPEC "%(startfile_default)"
%{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \
#undef STARTFILE_CRTBEGIN_SPEC
#define STARTFILE_CRTBEGIN_SPEC "\
%{!msvr4:m88kdgux.ld%s bcscrtbegin.o%s} \ %{!msvr4:m88kdgux.ld%s bcscrtbegin.o%s} \
%{msvr4:crtbegin.o%s} \ %{msvr4:crtbegin.o%s}"
%{svr4:%{ansi:/lib/values-Xc.o} \
%{!ansi:%{traditional:/lib/values-Xt.o} \
%{!traditional:/usr/lib/values-Xa.o}}}}}"
/* Subroutines for insn-output.c for Motorola 88000. /* Subroutines for insn-output.c for Motorola 88000.
Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@mcc.com) Contributed by Michael Tiemann (tiemann@mcc.com)
Currently maintained by (gcc@dg-rtp.dg.com) Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -261,17 +261,17 @@ emit_move_sequence (operands, mode, scratch) ...@@ -261,17 +261,17 @@ emit_move_sequence (operands, mode, scratch)
/* Simplify the source if we need to. */ /* Simplify the source if we need to. */
if (GET_CODE (operand1) != HIGH && immediate_operand (operand1, mode)) if (GET_CODE (operand1) != HIGH && immediate_operand (operand1, mode))
{ {
if (GET_CODE (operand1) != CONST_INT if (GET_CODE (operand1) != CONST_INT
&& GET_CODE (operand1) != CONST_DOUBLE) && GET_CODE (operand1) != CONST_DOUBLE)
{ {
rtx temp = ((reload_in_progress || reload_completed) rtx temp = ((reload_in_progress || reload_completed)
? operand0 : 0); ? operand0 : 0);
operands[1] = legitimize_address (flag_pic operands[1] = legitimize_address (flag_pic
&& symbolic_address_p (operand1), && symbolic_address_p (operand1),
operand1, temp, scratch); operand1, temp, scratch);
if (mode != SImode) if (mode != SImode)
operands[1] = gen_rtx (SUBREG, mode, operands[1], 0); operands[1] = gen_rtx (SUBREG, mode, operands[1], 0);
} }
} }
/* Now have insn-emit do whatever it normally does. */ /* Now have insn-emit do whatever it normally does. */
...@@ -1635,7 +1635,7 @@ output_ascii (file, opcode, max, p, size) ...@@ -1635,7 +1635,7 @@ output_ascii (file, opcode, max, p, size)
fprintf (file, "\\%03o", c); fprintf (file, "\\%03o", c);
num += 4; num += 4;
} }
else if (c >= ' ' && c < 0177) else if ((c >= ' ' && c < 0177) || (c == '\t'))
{ {
putc (c, file); putc (c, file);
num++; num++;
...@@ -1646,7 +1646,6 @@ output_ascii (file, opcode, max, p, size) ...@@ -1646,7 +1646,6 @@ output_ascii (file, opcode, max, p, size)
switch (c) switch (c)
{ {
/* Some assemblers can't handle \a, \v, or \?. */ /* Some assemblers can't handle \a, \v, or \?. */
case '\t': c = 't'; goto escape;
case '\f': c = 'f'; goto escape; case '\f': c = 'f'; goto escape;
case '\b': c = 'b'; goto escape; case '\b': c = 'b'; goto escape;
case '\r': c = 'r'; goto escape; case '\r': c = 'r'; goto escape;
...@@ -1933,6 +1932,9 @@ m88k_begin_prologue (stream, size) ...@@ -1933,6 +1932,9 @@ m88k_begin_prologue (stream, size)
FILE *stream; FILE *stream;
int size; int size;
{ {
if (TARGET_OMIT_LEAF_FRAME_POINTER && ! quiet_flag && leaf_function_p ())
fprintf (stderr, "$");\
m88k_prologue_done = 1; /* it's ok now to put out ln directives */ m88k_prologue_done = 1; /* it's ok now to put out ln directives */
} }
...@@ -2041,6 +2043,17 @@ m88k_end_epilogue (stream, size) ...@@ -2041,6 +2043,17 @@ m88k_end_epilogue (stream, size)
if (insn == 0 || GET_CODE (insn) != BARRIER) if (insn == 0 || GET_CODE (insn) != BARRIER)
fprintf (stream, "\tjmp\t %s\n", reg_names[1]); fprintf (stream, "\tjmp\t %s\n", reg_names[1]);
/* If the last insn is a barrier, and the insn before that is a call,
then add a nop instruction so that tdesc can walk the stack correctly
even though there is no epilogue. (Otherwise, the label for the
end of the tdesc region ends up at the start of the next function. */
if (insn && GET_CODE (insn) == BARRIER)
{
insn = prev_nonnote_insn (insn);
if (insn && GET_CODE (insn) == CALL_INSN)
fprintf (stream, "\tor\t %s,%s,%s\n",reg_names[0],reg_names[0],reg_names[0]);
}
output_short_branch_defs (stream); output_short_branch_defs (stream);
fprintf (stream, "\n"); fprintf (stream, "\n");
...@@ -2476,12 +2489,12 @@ output_block_profiler (file, blockno) ...@@ -2476,12 +2489,12 @@ output_block_profiler (file, blockno)
/* @@ Need to deal with PIC. I'm not sure what the requirements are on /* @@ Need to deal with PIC. I'm not sure what the requirements are on
register usage, so I used r26/r27 to be safe. */ register usage, so I used r26/r27 to be safe. */
fprintf (file, "\tor.u\t %s,%s,%shi16(%s+%d)\n", reg_names[27], reg_names[0], fprintf (file, "\tor.u\t %s,%s,%shi16(%s+%d)\n", reg_names[27], reg_names[0],
m88k_pound_sign, &block[1], 4 * blockno); m88k_pound_sign, &block[1], 4 * blockno);
fprintf (file, "\tld\t %s,%s,%slo16(%s+%d)\n", reg_names[26], reg_names[27], fprintf (file, "\tld\t %s,%s,%slo16(%s+%d)\n", reg_names[26], reg_names[27],
m88k_pound_sign, &block[1], 4 * blockno); m88k_pound_sign, &block[1], 4 * blockno);
fprintf (file, "\taddu\t %s,%s,1\n", reg_names[26], reg_names[26]); fprintf (file, "\taddu\t %s,%s,1\n", reg_names[26], reg_names[26]);
fprintf (file, "\tst\t %s,%s,%slo16(%s+%d)\n", reg_names[26], reg_names[27], fprintf (file, "\tst\t %s,%s,%slo16(%s+%d)\n", reg_names[26], reg_names[27],
m88k_pound_sign, &block[1], 4 * blockno); m88k_pound_sign, &block[1], 4 * blockno);
} }
/* Determine whether a function argument is passed in a register, and /* Determine whether a function argument is passed in a register, and
......
/* Definitions of target machine for GNU compiler for /* Definitions of target machine for GNU compiler for
Motorola m88100 in an 88open OCS/BCS environment. Motorola m88100 in an 88open OCS/BCS environment.
Copyright (C) 1988, 89, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Contributed by Michael Tiemann (tiemann@cygnus.com)
Enhanced by Michael Meissner (meissner@cygnus.com) Currently maintained by (gcc@dg-rtp.dg.com)
Version 2 port by Tom Wood (twood@pets.sps.mot.com)
This file is part of GNU CC. This file is part of GNU CC.
...@@ -197,15 +196,15 @@ extern char * reg_names[]; ...@@ -197,15 +196,15 @@ extern char * reg_names[];
/* Print subsidiary information on the compiler version in use. /* Print subsidiary information on the compiler version in use.
Redefined in sysv4.h, and luna.h. */ Redefined in sysv4.h, and luna.h. */
#define VERSION_INFO1 "88open OCS/BCS, " #define VERSION_INFO1 "m88k, "
#ifndef VERSION_INFO2 #ifndef VERSION_INFO2
#define VERSION_INFO2 "$Revision: 1.67 $" #define VERSION_INFO2 "$Revision: 1.68 $"
#endif #endif
#ifndef VERSION_STRING #ifndef VERSION_STRING
#define VERSION_STRING version_string #define VERSION_STRING version_string
#ifdef __STDC__ #ifdef __STDC__
#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.67 $ " __DATE__ #define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.68 $ " __DATE__
#else #else
#define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $" #define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $"
#endif /* __STDC__ */ #endif /* __STDC__ */
...@@ -295,6 +294,7 @@ extern char * reg_names[]; ...@@ -295,6 +294,7 @@ extern char * reg_names[];
{ "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \ { "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \
{ "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \ { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \
{ "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \ { "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \
{ "no-omit-leaf-frame-pointer", -MASK_OMIT_LEAF_FRAME_POINTER }, \
SUBTARGET_SWITCHES \ SUBTARGET_SWITCHES \
/* Default switches */ \ /* Default switches */ \
{ "", TARGET_DEFAULT }, \ { "", TARGET_DEFAULT }, \
...@@ -361,6 +361,8 @@ extern char * reg_names[]; ...@@ -361,6 +361,8 @@ extern char * reg_names[];
if (flag_pic) \ if (flag_pic) \
error ("-mshort-data-%s and PIC are incompatible", m88k_short_data); \ error ("-mshort-data-%s and PIC are incompatible", m88k_short_data); \
} \ } \
if (TARGET_OMIT_LEAF_FRAME_POINTER) /* keep nonleaf frame pointers */ \
flag_omit_frame_pointer = 1; \
} while (0) } while (0)
/*** Storage Layout ***/ /*** Storage Layout ***/
......
;;- Machine description for the Motorola 88000 for GNU C compiler ;;- Machine description for the Motorola 88000 for GNU C compiler
;; Copyright (C) 1988, 92, 93, 94, 1995 Free Software Foundation, Inc. ;;; Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
;; Contributed by Michael Tiemann (tiemann@mcc.com) ;; Contributed by Michael Tiemann (tiemann@mcc.com)
;; Additional changes by Michael Meissner (meissner@osf.org) ;; Currently maintained by (gcc@dg-rtp.dg.com)
;; Version 2 port by Tom Wood (twood@pets.sps.mot.com)
;; This file is part of GNU CC. ;; This file is part of GNU CC.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment