|
|
1.1 root 1: /*
2: * dpx2.h - Bull DPX/2 200 and 300 systems (m68k, SysVr3)
3: */
4:
5: #include "m68k.h"
6: #undef SELECT_RTX_SECTION
7: #include "svr3.h"
8:
9: /* See m68k.h. 7 means 68020 with 68881.
1.1.1.2 ! root 10: * We really have 68030 and 68882,
! 11: * but this will get us going.
1.1 root 12: */
13: #ifndef TARGET_DEFAULT
14: #define TARGET_DEFAULT 7
15: #endif
16:
17: #define OBJECT_FORMAT_COFF
18: #define NO_SYS_SIGLIST
19:
20: #ifdef CPP_PREDEFINES
21: #undef CPP_PREDEFINES
22: #endif
23: /*
24: * define all the things the compiler should
25: */
26: #ifdef ncl_mr
27: # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_mr=1"
28: #else
29: # ifdef ncl_el
30: # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_el"
31: # else
32: # define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020"
33: # endif
34: #endif
35:
36: #undef CPP_SPEC
37: /*
38: * use -ansi to imply POSIX and XOPEN and BULL source
39: * no -ansi implies _SYSV
40: */
1.1.1.2 ! root 41: /*
! 42: * you can't get a DPX/2 without a 68882 but allow it
! 43: * to be ignored...
! 44: */
! 45: #if 0
1.1 root 46: # define CPP_SPEC "%{ansi:-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BULL_SOURCE}\
47: %{!ansi:-D_SYSV}"
1.1.1.2 ! root 48: #else
! 49: # define __HAVE_68881__ 1
! 50: # define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }\
! 51: %{ansi:-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BULL_SOURCE}\
! 52: %{!ansi:-D_SYSV}"
! 53: #endif
1.1 root 54:
55: #undef ASM_LONG
56: #define ASM_LONG "\t.long"
57:
58: #define HAVE_ATEXIT
59: #undef DO_GLOBAL_CTORS_BODY /* don't use svr3.h version */
60: #undef DO_GLOBAL_DTORS_BODY
61:
1.1.1.2 ! root 62: #if 0 /* Should be no need now that svr3.h defines BSS_SECTION_FUNCTION. */
1.1 root 63: /*
64: * svr3.h says to use BSS_SECTION_FUNCTION
65: * but no one appears to, and there is
66: * no definition for m68k.
67: */
68: #ifndef BSS_SECTION_FUNCTION
69: # undef EXTRA_SECTION_FUNCTIONS
70: # define EXTRA_SECTION_FUNCTIONS \
71: CONST_SECTION_FUNCTION \
72: INIT_SECTION_FUNCTION \
73: FINI_SECTION_FUNCTION
74: #endif
1.1.1.2 ! root 75: #endif /* 0 */
1.1 root 76:
77: #ifndef USE_GAS
78: /*
79: * handle the native assembler.
80: * this does NOT yet work, there is much left to do.
81: * use GAS for now...
82: */
83: #undef ASM_OUTPUT_SOURCE_FILENAME
84: #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \
85: do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0)
86:
87: /*
88: * we don't seem to support any of:
89: * .globl
90: * .even
91: * .align
92: * .ascii
93: */
94: #undef ASM_GLOBALIZE_LABEL
95: #define ASM_GLOBALIZE_LABEL(FILE,NAME) while (0)
96: #undef ASM_OUTPUT_ALIGN
97: #define ASM_OUTPUT_ALIGN(asm_out_file, align) while (0)
98: #define STRING_LIMIT (0)
99: #undef ASM_APP_ON
100: #define ASM_APP_ON ""
101: #undef ASM_APP_OFF
102: #define ASM_APP_OFF ""
103: /*
104: * dc.b 'hello, world!'
105: * dc.b 10,0
106: * is how we have to output "hello, world!\n"
107: */
108: #undef ASM_OUTPUT_ASCII
109: #define ASM_OUTPUT_ASCII(asm_out_file, p, thissize) \
110: do { register int i, c, f=0; \
111: for (i = 0; i < thissize; i++) { \
112: c = p[i]; \
113: if (c == '\'' || c < ' ' || c > 127) { \
114: switch(f) { \
115: case 0: /* need to output dc.b etc */ \
116: fprintf(asm_out_file, "\tdc.b %d", c); \
117: f=1; \
118: break; \
119: case 1: \
120: fprintf(asm_out_file, ",%d", c); \
121: break; \
122: default: \
123: /* close a string */ \
124: fprintf(asm_out_file, "'\n\tdc.b %d", c); \
125: f=1; \
126: break; \
127: } \
128: } else { \
129: switch(f) { \
130: case 0: \
131: fprintf(asm_out_file, "\tdc.b '%c", c); \
132: f=2; \
133: break; \
134: case 2: \
135: fprintf(asm_out_file, "%c", c); \
136: break; \
137: default: \
138: fprintf(asm_out_file, "\n\tdc.b '%c", c); \
139: f=2; \
140: break; \
141: } \
142: } \
143: } \
144: if (f==2) \
145: putc('\'', asm_out_file); \
146: putc('\n', asm_out_file); } while (0)
147:
148: /* This is how to output an insn to push a register on the stack.
149: It need not be very fast code. */
150:
151: #undef ASM_OUTPUT_REG_PUSH
152: #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
153: fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO])
154:
155: /* This is how to output an insn to pop a register from the stack.
156: It need not be very fast code. */
157:
158: #undef ASM_OUTPUT_REG_POP
159: #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
160: fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO])
161:
162: #endif /* ! use gas */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.