dpx2.h
来自「gcc3.2.1源代码」· C头文件 代码 · 共 496 行 · 第 1/2 页
H
496 行
/* Definitions of target machine for GNU compiler. Bull DPX/2 200 and 300 systems (m68k, SysVr3). Copyright (C) 1987, 1993, 1994, 1995, 1996, 1999, 2000 Free Software Foundation, Inc. Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr).This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING. If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA. */#ifndef USE_GAS#define MOTOROLA /* Use Motorola syntax rather than "MIT" */#define SGS_NO_LI /* Suppress jump table label usage */#define VERSADOS /* This is the name of the assembler we have */#endif#include "m68k/m68k.h"#undef SELECT_RTX_SECTION#include "svr3.h"#undef INT_OP_GROUP#define INT_OP_GROUP INT_OP_DC/* We use collect2 instead of ctors_section constructors. */#undef INIT_SECTION_ASM_OP#undef FINI_SECTION_ASM_OP#undef DTORS_SECTION_ASM_OP#undef DO_GLOBAL_CTORS_BODY/* Remove handling for a separate constant data section. We put constant data in text_section, which is the default. */#undef SELECT_SECTION#undef SELECT_RTX_SECTION#undef EXTRA_SECTIONS#undef EXTRA_SECTION_FUNCTIONS#undef CONST_SECTION_ASM_OP#undef READONLY_DATA_SECTION#define DPX2/* See m68k.h. 7 means 68020 with 68881. * We really have 68030 and 68882, * but this will get us going. */#ifndef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)#endif#define OBJECT_FORMAT_COFF#ifdef CPP_PREDEFINES#undef CPP_PREDEFINES#endif/* * define all the things the compiler should */#ifdef ncl_mr# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_mr=1 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"#else# ifdef ncl_el# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -Dncl_el -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"# else# define CPP_PREDEFINES "-Dunix -Dbull -DDPX2 -DSVR3 -Dmc68000 -Dmc68020 -D_BULL_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"# endif#endif#undef CPP_SPEC/* * you can't get a DPX/2 without a 68882 but allow it * to be ignored... */# define __HAVE_68881__ 1# define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }"#undef DO_GLOBAL_CTORS_BODY /* don't use svr3.h version */#undef DO_GLOBAL_DTORS_BODY#ifndef USE_GAS/* * handle the native MOTOROLA VERSAdos assembler. *//* See m68k.h. 3 means 68020 with 68881 and no bitfield * bitfield instructions do not seem to work a clean way. */#undef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_68881|MASK_68020)/* The native assembler doesn't support fmovecr. */#define NO_ASM_FMOVECR#undef TEXT_SECTION_ASM_OP#define TEXT_SECTION_ASM_OP "\tsection 10"#undef DATA_SECTION_ASM_OP#define DATA_SECTION_ASM_OP "\tsection 15"#define BSS_SECTION_ASM_OP "\tsection 14"/* Don't try using XFmode. */#undef LONG_DOUBLE_TYPE_SIZE#define LONG_DOUBLE_TYPE_SIZE 64/* Define if you don't want extended real, but do want to use the software floating point emulator for REAL_ARITHMETIC and decimal <-> binary conversion. */#define REAL_ARITHMETIC #undef ASM_OUTPUT_SOURCE_FILENAME#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \ do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0)/* * we don't seem to support any of: * .globl * .even * .align * .ascii */#undef ASM_OUTPUT_SKIP#define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\tdcb.b %u,0\n", (SIZE))#undef GLOBAL_ASM_OP #define GLOBAL_ASM_OP "\txdef\t"#undef ASM_OUTPUT_ALIGN#define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) >= 1) \ fprintf (FILE, "\tds.w 0\n");#define STRING_LIMIT (0)#undef ASM_APP_ON#define ASM_APP_ON ""#undef ASM_APP_OFF#define ASM_APP_OFF ""/* * dc.b 'hello, world!' * dc.b 10,0 * is how we have to output "hello, world!\n" */#undef ASM_OUTPUT_ASCII#define ASM_OUTPUT_ASCII(asm_out_file, p, thissize) \ do { register int i, c, f=0, len=0; \ for (i = 0; i < thissize; i++) { \ c = p[i]; \ if (c == '\'' || c < ' ' || c > 127) { \ switch(f) { \ case 0: /* need to output dc.b etc */ \ fprintf(asm_out_file, "\tdc.b %d", c); \ f=1; \ break; \ case 1: \ fprintf(asm_out_file, ",%d", c); \ break; \ default: \ /* close a string */ \ fprintf(asm_out_file, "'\n\tdc.b %d", c); \ f=1; \ break; \ } \ } else { \ switch(f) { \ case 0: \ fprintf(asm_out_file, "\tdc.b '%c", c); \ f=2; \ break; \ case 2: \ if (len >= 79) { \ fprintf(asm_out_file, "'\n\tdc.b '%c", c); \ len = 0; } \ else \ fprintf(asm_out_file, "%c", c); \ break; \ default: \ len = 0; \ fprintf(asm_out_file, "\n\tdc.b '%c", c); \ f=2; \ break; \ } \ } \ len++; \ } \ if (f==2) \ putc('\'', asm_out_file); \ putc('\n', asm_out_file); } while (0)/* This is how to output an insn to push a register on the stack. It need not be very fast code. */#undef ASM_OUTPUT_REG_PUSH#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO])/* This is how to output an insn to pop a register from the stack. It need not be very fast code. */#undef ASM_OUTPUT_REG_POP#define ASM_OUTPUT_REG_POP(FILE,REGNO) \ fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO])#define PUT_SDB_FUNCTION_START(LINE) \ fprintf (asm_out_file, \ "\t.def\t.bf%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \ SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)#define PUT_SDB_FUNCTION_END(LINE) \ fprintf (asm_out_file, \ "\t.def\t.ef%s\t.val\t*%s\t.scl\t101%s\t.line\t%d%s\t.endef\n", \ SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)#define PUT_SDB_BLOCK_START(LINE) \ fprintf (asm_out_file, \ "\t.def\t.bb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \ SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)#define PUT_SDB_BLOCK_END(LINE) \ fprintf (asm_out_file, \ "\t.def\t.eb%s\t.val\t*%s\t.scl\t100%s\t.line\t%d%s\t.endef\n", \ SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)#define PUT_SDB_EPILOGUE_END(NAME) /* Output type in decimal not in octal as done in sdbout.c */ #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\t.type\t0%d%s", a, SDB_DELIM) /* Translate Motorola opcodes such as `jbeq' into VERSAdos opcodes such as `beq'. Change `fbeq' to `fbseq', `fbne' to `fbsneq'.*/#undef ASM_OUTPUT_OPCODE#define ASM_OUTPUT_OPCODE(FILE, PTR) \{ if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?