⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ns32k.h

📁 这个是LINUX下的GDB调度工具的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ns32k-opcode.h -- Opcode table for National Semi 32k processor   Copyright 1987, 1991, 1994, 2002 Free Software Foundation, Inc.This file is part of GAS, the GNU Assembler.GAS 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 1, or (at your option)any later version.GAS 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 GAS; see the file COPYING.  If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */#ifdef SEQUENT_COMPATABILITY#define DEF_MODEC 20#define DEF_MODEL 21#endif#ifndef DEF_MODEC#define DEF_MODEC 20#endif#ifndef DEF_MODEL#define DEF_MODEL 20#endif/*   After deciding the instruction entry (via hash.c) the instruction parser   will try to match the operands after the instruction to the required set   given in the entry operandfield. Every operand will result in a change in   the opcode or the addition of data to the opcode.   The operands in the source instruction are checked for inconsistent   semantics.	F : 32 bit float	general form	L : 64 bit float	    "	B : byte		    "	W : word		    "	D : double-word		    "	A : double-word		gen-address-form ie no regs, no immediate	I : integer writeable   gen int except immediate (A + reg)	Z : floating writeable	gen float except immediate (Z + freg)	d : displacement	b : displacement - pc relative addressing  acb	p : displacement - pc relative addressing  br bcond bsr cxp	q : quick	i : immediate (8 bits)	    This is not a standard ns32k operandtype, it is used to build	    instructions like    svc arg1,arg2	    Svc is the instruction SuperVisorCall and is sometimes used to	    call OS-routines from usermode. Some args might be handy!	r : register number (3 bits)	O : setcfg instruction optionslist	C : cinv instruction optionslist	S : stringinstruction optionslist	U : registerlist	save,enter	u : registerlist	restore,exit	M : mmu register	P : cpu register	g : 3:rd operand of inss or exts instruction	G : 4:th operand of inss or exts instruction	    Those operands are encoded in the same byte.	    This byte is placed last in the instruction.	f : operand of sfsr	H : sequent-hack for bsr (Warning)column	1 	instructions	2 	number of bits in opcode.	3 	number of bits in opcode explicitly		determined by the instruction type.	4 	opcodeseed, the number we build our opcode		from.	5 	operandtypes, used by operandparser.	6 	size in bytes of immediate*/struct ns32k_opcode {  const char *name;  unsigned char opcode_id_size; /* not used by the assembler */  unsigned char opcode_size;  unsigned long opcode_seed;  const char *operands;  unsigned char im_size;	/* not used by dissassembler */  const char *default_args;	/* default to those args when none given */  char default_modec;		/* default to this addr-mode when ambigous				   ie when the argument of a general addr-mode				   is a plain constant */  char default_model;		/* is a plain label */};#ifdef comment/* This section was from the gdb version of this file. */#ifndef ns32k_opcodeT#define ns32k_opcodeT int#endif /* no ns32k_opcodeT */struct not_wot			/* ns32k opcode table: wot to do with this */				/* particular opcode */{  int obits;			/* number of opcode bits */  int ibits;			/* number of instruction bits */  ns32k_opcodeT code;		/* op-code (may be > 8 bits!) */  const char *args;		/* how to compile said opcode */};struct not			/* ns32k opcode text */{  const char *name;		/* opcode name: lowercase string  [key]  */  struct not_wot detail;	/* rest of opcode table          [datum] */};/* Instructions look like this:   basic instruction--1, 2, or 3 bytes   index byte for operand A, if operand A is indexed--1 byte   index byte for operand B, if operand B is indexed--1 byte   addressing extension for operand A   addressing extension for operand B   implied operands   Operand A is the operand listed first in the following opcode table.   Operand B is the operand listed second in the following opcode table.   All instructions have at most 2 general operands, so this is enough.   The implied operands are associated with operands other than A and B.   Each operand has a digit and a letter.   The digit gives the position in the assembly language.  The letter,   one of the following, tells us what kind of operand it is.  *//* F : 32 bit float * L : 64 bit float * B : byte * W : word * D : double-word * I : integer not immediate * Z : floating not immediate * d : displacement * q : quick * i : immediate (8 bits) * r : register number (3 bits) * p : displacement - pc relative addressing*/#endif /* comment */static const struct ns32k_opcode ns32k_opcodes[]={  { "absf",	14,24,	0x35be,	"1F2Z",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "absl",	14,24,	0x34be,	"1L2Z",		8,	"",	DEF_MODEC,DEF_MODEL	},  { "absb",	14,24,	0x304e, "1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "absw",	14,24,	0x314e, "1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "absd",	14,24,	0x334e, "1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "acbb",	 7,16,	0x4c,	"2I1q3p",	1,	"",	DEF_MODEC,DEF_MODEL	},  { "acbw",	 7,16,	0x4d,	"2I1q3p",	2,	"",	DEF_MODEC,DEF_MODEL	},  { "acbd",	 7,16,	0x4f,	"2I1q3p",	4,	"",	DEF_MODEC,DEF_MODEL	},  { "addf",	14,24,	0x01be,	"1F2Z",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "addl",	14,24,	0x00be, "1L2Z",		8,	"",	DEF_MODEC,DEF_MODEL	},  { "addb",	 6,16,	0x00,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "addw",	 6,16,	0x01,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "addd",	 6,16,	0x03,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "addcb",	 6,16,	0x10,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "addcw",	 6,16,	0x11,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "addcd",	 6,16,	0x13,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "addpb",	14,24,	0x3c4e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "addpw",	14,24,	0x3d4e,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "addpd",	14,24,	0x3f4e,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "addqb",	 7,16,	0x0c,	"2I1q",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "addqw",	 7,16,	0x0d,	"2I1q",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "addqd",	 7,16,	0x0f,	"2I1q",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "addr",	 6,16,	0x27,	"1A2I",		4,	"",	21,21	},  { "adjspb",	11,16,	0x057c,	"1B",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "adjspw",	11,16,	0x057d,	"1W", 		2,	"",	DEF_MODEC,DEF_MODEL	},  { "adjspd",	11,16,	0x057f,	"1D", 		4,	"",	DEF_MODEC,DEF_MODEL	},  { "andb",	 6,16,	0x28,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "andw",	 6,16,	0x29,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "andd",	 6,16,	0x2b,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "ashb",	14,24,	0x044e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "ashw",	14,24,	0x054e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "ashd",	14,24,	0x074e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "beq",	 8,8,	0x0a,	"1p",		0,	"",	21,21	},  { "bne",	 8,8,	0x1a,	"1p",		0,	"",	21,21	},  { "bcs",	 8,8,	0x2a,	"1p",		0,	"",	21,21	},  { "bcc",	 8,8,	0x3a,	"1p",		0,	"",	21,21	},  { "bhi",	 8,8,	0x4a,	"1p",		0,	"",	21,21	},  { "bls",	 8,8,	0x5a,	"1p",		0,	"",	21,21	},  { "bgt",	 8,8,	0x6a,	"1p",		0,	"",	21,21	},  { "ble",	 8,8,	0x7a,	"1p",		0,	"",	21,21	},  { "bfs",	 8,8,	0x8a,	"1p",		0,	"",	21,21	},  { "bfc",	 8,8,	0x9a,	"1p",		0,	"",	21,21	},  { "blo",	 8,8,	0xaa,	"1p",		0,	"",	21,21	},  { "bhs",	 8,8,	0xba,	"1p",		0,	"",	21,21	},  { "blt",	 8,8,	0xca,	"1p",		0,	"",	21,21	},  { "bge",	 8,8,	0xda,	"1p",		0,	"",	21,21	},  { "but",	 8,8,	0xea,	"1p",		0,	"",	21,21	},  { "buf",	 8,8,	0xfa,	"1p",		0,	"",	21,21	},  { "bicb",	 6,16,	0x08,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "bicw",	 6,16,	0x09,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "bicd",	 6,16,	0x0b,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "bicpsrb",	11,16,	0x17c,	"1B",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "bicpsrw",	11,16,	0x17d,	"1W",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "bispsrb",	11,16,	0x37c,	"1B",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "bispsrw",	11,16,	0x37d,	"1W",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "bpt",	 8,8,	0xf2,	"",		0,	"",	DEF_MODEC,DEF_MODEL	},  { "br",	 8,8,	0xea,	"1p",		0,	"",	21,21	},#ifdef SEQUENT_COMPATABILITY  { "bsr",	 8,8,	0x02,	"1H",		0,	"",	21,21	},#else  { "bsr",	 8,8,	0x02,	"1p",		0,	"",	21,21	},#endif  { "caseb",	11,16,	0x77c,	"1B",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "casew",	11,16,	0x77d,	"1W",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "cased",	11,16,	0x77f,	"1D",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitb",	14,24,	0x084e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitw",	14,24,	0x094e,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitd",	14,24,	0x0b4e,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitib",	14,24,	0x0c4e,	"1B2I",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitiw",	14,24,	0x0d4e,	"1W2I",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "cbitid",	14,24,	0x0f4e,	"1D2I",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "checkb",	11,24,	0x0ee,	"2A3B1r",	1,	"",	DEF_MODEC,DEF_MODEL	},  { "checkw",	11,24,	0x1ee,	"2A3W1r",	2,	"",	DEF_MODEC,DEF_MODEL	},  { "checkd",	11,24,	0x3ee,	"2A3D1r",	4,	"",	DEF_MODEC,DEF_MODEL	},  { "cinv",	14,24,	0x271e,	"2D1C",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpf",	14,24,	0x09be,	"1F2F",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpl",	14,24,	0x08be,	"1L2L",		8,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpb",	 6,16,	0x04,	"1B2B",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpw",	 6,16,	0x05,	"1W2W",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpd",	 6,16,	0x07,	"1D2D",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpmb",	14,24,	0x04ce,	"1A2A3b",	1,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpmw",	14,24,	0x05ce,	"1A2A3b",	2,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpmd",	14,24,	0x07ce,	"1A2A3b",	4,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpqb",	 7,16,	0x1c,	"2B1q",		1,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpqw",	 7,16,	0x1d,	"2W1q",		2,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpqd",	 7,16,	0x1f,	"2D1q",		4,	"",	DEF_MODEC,DEF_MODEL	},  { "cmpsb",	16,24,	0x040e,	"1S",		0,	"[]",	DEF_MODEC,DEF_MODEL	},  { "cmpsw",	16,24,	0x050e,	"1S",		0,	"[]",	DEF_MODEC,DEF_MODEL	},  { "cmpsd",	16,24,	0x070e,	"1S",		0,	"[]",	DEF_MODEC,DEF_MODEL	},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -