📄 3b1.h
字号:
/* Definitions of target machine for GNU compiler. AT&T UNIX PC version (pc7300, 3b1) Copyright (C) 1987, 1993, 1996, 1999, 2000 Free Software Foundation, Inc. Contributed by Alex Crain (alex@umbc3.umd.edu).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. */#define SGS_SWITCH_TABLES /* Different switch table handling */#include "m68k/hp320.h"/* See m68k.h. 0 means 680[01]0 with no 68881. */#undef TARGET_DEFAULT#define TARGET_DEFAULT 0/* Don't try using XFmode. */#undef LONG_DOUBLE_TYPE_SIZE#define LONG_DOUBLE_TYPE_SIZE 64/* -m68020 requires special flags to the assembler. */#undef ASM_SPEC#define ASM_SPEC "%{m68020:-68020}%{!m68020:-68010} %{m68881:-68881}"/* we use /lib/libp/lib* when profiling */#undef LIB_SPEC#define LIB_SPEC "%{!shlib:%{p:-L/lib/libp} %{pg:-L/lib/libp} -lc}"/* shared libraries need to use crt0s.o */#undef STARTFILE_SPEC#define STARTFILE_SPEC \ "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ %{shlib:crt0s.o%s shlib.ifile%s} "/* Make output for SDB. */#define SDB_DEBUGGING_INFO 1/* The .file command should always begin the output. */#undef ASM_FILE_START#define ASM_FILE_START(FILE) \output_file_directive ((FILE), main_input_filename)/* Define __HAVE_68881__ in preprocessor if -m68881 is specified. This will control the use of inline 68881 insns in certain macros. */#undef CPP_SPEC#define CPP_SPEC "%{m68881:-D__HAVE_68881__}"/* Names to predefine in the preprocessor for this target machine. *//* ihnp4!lmayk!lgm@eddie.mit.edu says mc68000 and m68k should not be here. */#undef CPP_PREDEFINES#define CPP_PREDEFINES "-Dmc68k -Dunix -Dunixpc -D__motorola__ -Asystem=unix -Asystem=svr3 -Acpu=m68k -Amachine=m68k"#undef REGISTER_NAMES#define REGISTER_NAMES \{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \ "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"}/* Specify how to pad function arguments. Value should be `upward', `downward' or `none'. Same as the default, except no padding for large or variable-size args. */#define FUNCTION_ARG_PADDING(MODE, TYPE) \ (((MODE) == BLKmode \ ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ && int_size_in_bytes (TYPE) < PARM_BOUNDARY / BITS_PER_UNIT) \ : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ ? downward : none)/* The 3b1 does not have `atexit'. */#define NEED_ATEXIT/* Override parts of m68k.h to fit the SGS-3b1 assembler. */#undef TARGET_VERSION#undef ASM_FORMAT_PRIVATE_NAME#undef ASM_OUTPUT_ALIGN#undef ASM_OUTPUT_SOURCE_FILENAME#undef ASM_OUTPUT_SOURCE_LINE#undef PRINT_OPERAND_ADDRESS#undef ASM_GENERATE_INTERNAL_LABEL#undef FUNCTION_PROFILER#undef ASM_OUTPUT_ADDR_VEC_ELT#undef ASM_OUTPUT_ADDR_DIFF_ELT#undef ASM_OUTPUT_INTERNAL_LABEL#undef ASM_OUTPUT_OPCODE#undef ASM_OUTPUT_LOCAL#undef USER_LABEL_PREFIX#undef ASM_OUTPUT_ASCII#define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T unixpc syntax)");/* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. LABELNO is an integer which is different for each call. */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \ sprintf ((OUTPUT), "%s_%%%d", (NAME), (LABELNO)))#define ASM_OUTPUT_ALIGN(FILE,LOG) \do { \ if ((LOG) == 1) \ fprintf (FILE, "\teven\n"); \ else if ((LOG) != 0) \ abort (); \} while (0)/* This is how to output an assembler line that says to advance the location counter by SIZE bytes. */#undef ASM_OUTPUT_SKIP#define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\tspace %d\n", (SIZE))/* Can't use ASM_OUTPUT_SKIP in text section; it doesn't leave 0s. */#define ASM_NO_SKIP_IN_TEXT 1/* The beginnings of sdb support... */#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \ do { fprintf (FILE, "\tfile\t"); \ output_quoted_string (FILE, FILENAME); \ fprintf (FILE, "\n"); \ } while (0)#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \ fprintf (FILE, "\tln\t%d\n", \ (sdb_begin_function_line \ ? (LINENO) - sdb_begin_function_line : 1))/* Yet another null terminated string format. */#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ do { register size_t sp = 0, lp = 0, limit = (LEN); \ fprintf ((FILE), "\tbyte\t"); \ loop: \ if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \ { lp += 3; \ fprintf ((FILE), "'%c", (PTR)[sp]); } \ else \ { lp += 5; \ fprintf ((FILE), "0x%x", (PTR)[sp]); } \ if (++sp < limit) \ { if (lp > 60) \ { lp = 0; \ fprintf ((FILE), "\n%s", ASCII_DATA_ASM_OP); } \ else \ putc (',', (FILE)); \ goto loop; } \ putc ('\n', (FILE)); } while (0)/* Note that in the case of the movhi which fetches an element of an ADDR_DIFF_VEC the offset output is too large by 2. This is because the 3b1 assembler refuses to subtract 2. ASM_OUTPUT_CASE_LABEL, below, compensates for this. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \{ register rtx reg1, reg2, breg, ireg; \ register rtx addr = ADDR; \ rtx offset; \ switch (GET_CODE (addr)) \ { \ case REG: \ fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ reg1 = 0; reg2 = 0; \ ireg = 0; breg = 0; \ offset = 0; \ if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \ { \ offset = XEXP (addr, 0); \ addr = XEXP (addr, 1); \ } \ else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \ { \ offset = XEXP (addr, 1); \ addr = XEXP (addr, 0); \ } \ if (GET_CODE (addr) != PLUS) ; \ else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \ { \ reg1 = XEXP (addr, 0); \ addr = XEXP (addr, 1); \ } \ else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \ { \ reg1 = XEXP (addr, 1); \ addr = XEXP (addr, 0); \ } \ else if (GET_CODE (XEXP (addr, 0)) == MULT) \ { \ reg1 = XEXP (addr, 0); \ addr = XEXP (addr, 1); \ } \ else if (GET_CODE (XEXP (addr, 1)) == MULT) \ { \ reg1 = XEXP (addr, 1); \ addr = XEXP (addr, 0); \ } \ else if (GET_CODE (XEXP (addr, 0)) == REG) \ { \ reg1 = XEXP (addr, 0); \ addr = XEXP (addr, 1); \ } \ else if (GET_CODE (XEXP (addr, 1)) == REG) \ { \ reg1 = XEXP (addr, 1); \ addr = XEXP (addr, 0); \ } \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -