Add MIPS32 as a seperate MIPS architecture
This commit is contained in:
parent
2a91907cc0
commit
388732e7f6
|
@ -211,10 +211,11 @@ esac
|
|||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
|
||||
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
|
||||
| pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
|
@ -251,11 +252,12 @@ case $basic_machine in
|
|||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
|
@ -267,7 +269,7 @@ case $basic_machine in
|
|||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| f301-* | s390-* | sv1-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2000-10-16 Chris Demetriou <cgd@sibyte.com>
|
||||
|
||||
* mips.h (E_MIPS_ARCH_32): New constant.
|
||||
(E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the
|
||||
former with the latter.
|
||||
|
||||
2000-11-30 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* common.h (EM_X86_64): New macro.
|
||||
|
|
|
@ -121,6 +121,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
|
|||
/* -mips4 code. */
|
||||
#define E_MIPS_ARCH_4 0x30000000
|
||||
|
||||
/* -mips32 code. */
|
||||
#define E_MIPS_ARCH_32 0x50000000
|
||||
|
||||
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
|
||||
#define EF_MIPS_ABI 0x0000F000
|
||||
|
||||
|
@ -153,9 +156,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
|
|||
#define E_MIPS_MACH_4100 0x00830000
|
||||
#define E_MIPS_MACH_4650 0x00850000
|
||||
#define E_MIPS_MACH_4111 0x00880000
|
||||
/* -mips32 code.
|
||||
It is easier to treat MIPS32 as a machine rather than an architecture. */
|
||||
#define E_MIPS_MACH_MIPS32 0x00890000
|
||||
#define E_MIPS_MACH_MIPS32_4K 0x00890000
|
||||
|
||||
/* Processor specific section indices. These sections do not actually
|
||||
exist. Symbols with a st_shndx field corresponding to one of these
|
||||
|
|
|
@ -8,6 +8,23 @@
|
|||
(MIPS operand specifier comments): Remove 'm', add 'U' and
|
||||
'J', and update the meaning of 'B' so that it's more general.
|
||||
|
||||
* mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
|
||||
INSN_ISA5): Renumber, redefine to mean the ISA at which the
|
||||
instruction was added.
|
||||
(INSN_ISA32): New constant.
|
||||
(INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
|
||||
Renumber to avoid new and/or renumbered INSN_* constants.
|
||||
(INSN_MIPS32): Delete.
|
||||
(ISA_UNKNOWN): New constant to indicate unknown ISA.
|
||||
(ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
|
||||
ISA_MIPS32): New constants, defined to be the mask of INSN_*
|
||||
constants available at that ISA level.
|
||||
(CPU_UNKNOWN): New constant to indicate unknown CPU.
|
||||
(CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
|
||||
define it with a unique value.
|
||||
(OPCODE_IS_MEMBER): Update for new ISA membership-related
|
||||
constant meanings.
|
||||
|
||||
2000-10-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B.
|
||||
|
|
|
@ -302,41 +302,43 @@ struct mips_opcode
|
|||
disassembler, and requires special treatment by the assembler. */
|
||||
#define INSN_MACRO 0xffffffff
|
||||
|
||||
/* Masks used to mark instructions to indicate which MIPS ISA level
|
||||
they were introduced in. ISAs, as defined below, are logical
|
||||
ORs of these bits, indicatingthat they support the instructions
|
||||
defined at the given level. */
|
||||
|
||||
|
||||
|
||||
|
||||
/* MIPS ISA field--CPU level at which insn is supported. */
|
||||
#define INSN_ISA 0x0000000F
|
||||
/* An instruction which is not part of any basic MIPS ISA.
|
||||
(ie it is a chip specific instruction) */
|
||||
#define INSN_NO_ISA 0x00000000
|
||||
/* MIPS ISA 1 instruction. */
|
||||
#define INSN_ISA1 0x00000001
|
||||
/* MIPS ISA 2 instruction (R6000 or R4000). */
|
||||
#define INSN_ISA2 0x00000002
|
||||
/* MIPS ISA 3 instruction (R4000). */
|
||||
#define INSN_ISA3 0x00000003
|
||||
/* MIPS ISA 4 instruction (R8000). */
|
||||
#define INSN_ISA4 0x00000004
|
||||
#define INSN_ISA5 0x00000005
|
||||
#define INSN_ISA1 0x00000010
|
||||
#define INSN_ISA2 0x00000020
|
||||
#define INSN_ISA3 0x00000040
|
||||
#define INSN_ISA4 0x00000080
|
||||
#define INSN_ISA5 0x00000100
|
||||
#define INSN_ISA32 0x00000200
|
||||
|
||||
/* Chip specific instructions. These are bitmasks. */
|
||||
|
||||
/* MIPS R4650 instruction. */
|
||||
#define INSN_4650 0x00000010
|
||||
#define INSN_4650 0x00010000
|
||||
/* LSI R4010 instruction. */
|
||||
#define INSN_4010 0x00000020
|
||||
#define INSN_4010 0x00020000
|
||||
/* NEC VR4100 instruction. */
|
||||
#define INSN_4100 0x00000040
|
||||
#define INSN_4100 0x00040000
|
||||
/* Toshiba R3900 instruction. */
|
||||
#define INSN_3900 0x00000080
|
||||
/* MIPS32 instruction (4Kc, 4Km, 4Kp). */
|
||||
#define INSN_MIPS32 0x00000100
|
||||
#define INSN_3900 0x00080000
|
||||
/* 32-bit code running on a ISA3+ CPU. */
|
||||
#define INSN_GP32 0x00001000
|
||||
#define INSN_GP32 0x00100000
|
||||
|
||||
/* MIPS ISA defines, use instead of hardcoding ISA level. */
|
||||
|
||||
#define ISA_UNKNOWN 0 /* Gas internal use. */
|
||||
#define ISA_MIPS1 (INSN_ISA1)
|
||||
#define ISA_MIPS2 (ISA_MIPS1 | INSN_ISA2)
|
||||
#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
|
||||
#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
|
||||
#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
|
||||
|
||||
/* CPU defines, use instead of hardcoding processor number. Keep this
|
||||
in sync with bfd/archures.c in order for machine selection to work. */
|
||||
#define CPU_UNKNOWN 0 /* Gas internal use. */
|
||||
#define CPU_R2000 2000
|
||||
#define CPU_R3000 3000
|
||||
#define CPU_R3900 3900
|
||||
|
@ -354,7 +356,7 @@ struct mips_opcode
|
|||
#define CPU_R10000 10000
|
||||
#define CPU_MIPS16 16
|
||||
#define CPU_MIPS32 32
|
||||
#define CPU_4K CPU_MIPS32
|
||||
#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K' */
|
||||
|
||||
/* Test for membership in an ISA including chip specific ISAs.
|
||||
INSN is pointer to an element of the opcode table; ISA is the
|
||||
|
@ -365,25 +367,24 @@ struct mips_opcode
|
|||
in the MIPS gas docs. */
|
||||
|
||||
#define OPCODE_IS_MEMBER(insn, isa, cpu, gp32) \
|
||||
((((insn)->membership & INSN_ISA) != 0 \
|
||||
&& ((insn)->membership & INSN_ISA) <= (unsigned) isa \
|
||||
((((insn)->membership & isa) != 0 \
|
||||
&& ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
|
||||
|| (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
|
||||
|| (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
|
||||
|| ((cpu == CPU_VR4100 || cpu == CPU_R4111) \
|
||||
&& ((insn)->membership & INSN_4100) != 0) \
|
||||
|| (cpu == CPU_MIPS32 && ((insn)->membership & INSN_MIPS32) != 0) \
|
||||
|| (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0))
|
||||
|
||||
/* This is a list of macro expanded instructions.
|
||||
*
|
||||
* _I appended means immediate
|
||||
* _A appended means address
|
||||
* _AB appended means address with base register
|
||||
* _D appended means 64 bit floating point constant
|
||||
* _S appended means 32 bit floating point constant
|
||||
*/
|
||||
enum {
|
||||
|
||||
_I appended means immediate
|
||||
_A appended means address
|
||||
_AB appended means address with base register
|
||||
_D appended means 64 bit floating point constant
|
||||
_S appended means 32 bit floating point constant. */
|
||||
|
||||
enum
|
||||
{
|
||||
M_ABS,
|
||||
M_ADD_I,
|
||||
M_ADDU_I,
|
||||
|
|
Loading…
Reference in New Issue