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

📄 instrs

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻
📖 第 1 页 / 共 2 页
字号:
####	@(#)instrs	6.1	ULTRIX	12/23/87######***********************************************************************##									*##			Copyright (c) 1984 by				*##		Digital Equipment Corporation, Maynard, MA		*##			All rights reserved.				*##									*##   This software is furnished under a license and may be used and	*##   copied  only  in accordance with the terms of such license and	*##   with the  inclusion  of  the  above  copyright  notice.   This	*##   software  or  any  other copies thereof may not be provided or	*##   otherwise made available to any other person.  No title to and	*##   ownership of the software is hereby transferred.			*##									*##   This software is  derived  from  software  received  from  the	*##   University    of   California,   Berkeley,   and   from   Bell	*##   Laboratories.  Use, duplication, or disclosure is  subject  to	*##   restrictions  under  license  agreements  with  University  of	*##   California and with AT&T.						*##									*##   The information in this software is subject to change  without	*##   notice  and should not be construed as a commitment by Digital	*##   Equipment Corporation.						*##									*##   Digital assumes no responsibility for the use  or  reliability	*##   of its software on equipment which is not supplied by Digital.	*##									*##***********************************************************************/####	Copyright (c) 1982 Regents of the University of California##	@(#)instrs 4.9 6/30/83####	Robert R. Henry##	University of California, Berkeley##	Berkeley, CA##	February 6, 1982####	Updated 19 May 83 to include the page number in the##	architecture reference manual (1981 edition) the instruction##	is documented on, and to enumerate the instructions in the same##	order as the reference manual does.####	Updated 08-May-86 to provide C2 with .stab directive info (vjh).####	THIS FILE IS BOTH AN AWK SCRIPT AND THE DATA####	Instruction definitions for the VAX####	This file is processed by an awk script, viz:##	(echo "FLAVOR AS"; cat instrs) | awk -f instrs > as.instrs##	(echo "FLAVOR ADB"; cat instrs) | awk -f instrs > as.instrs##	(echo "FLAVOR SDB"; cat instrs) | awk -f instrs > as.instrs##	(echo "FLAVOR C2"; cat instrs) | awk -f instrs > c2.instrs####	The data in this file is shared between:##	as	assembler##	c2	optimizer##	adb	debugger##	sdb	symbolic debugger####	The awk script reads itself, and produces macros understood##	by the appropriate consumer. The awk script determines how##	to interpret the file by looking for a line of the form:##	FLAVOR	AS##	FLAVOR	ADB		(same as AS, but without pseudo instructions)##	FLAVOR	SDB		(same as ADB)##	FLAVOR	C2		(radically different format for instructions)##	and proceeding accordingly.  This line should be prepended to##	the front of this file.####	Lines starting with # are always comments to awk##	Lines starting with ## are always comments##	Lines starting with a single # are data lines, to be output.####	Empty lines are passed through####	field	user(s)		what####	$2	awk		#: comment to awk####	$3	as, c2, adb	instruction name####	$4	c2		instruction class##	$5	c2		instruction sub class##				HARD, TN1, TN2, TN3, TNX2, OP####	$6	as, adb		escape opcode byte (NONE, NEW, ESCD, ESCF)##	$7	as, adb		primary opcode byte##	##	$8	as, adb		number of arguments##	$9	as, adb		1st operand: access A,V,R,W,M,I,B##	$10	as, adb		1st operand: type, BWLQOFDGH####	$11	as, adb		2nd operand: access##		...######	These are the definitions used in this file:##	instruction class (c2)##		understood only by c2.  If it is HARD, the second field##		is ignored.##	instruction subclass: (c2)##		HARD		paired with the class##		S		single valued attribute to C2##		TN1		class + type of 1st operand##		TN2		class + type of 2nd operand##		TN3		class + type of 3rd operand##		TNX2		class + type of 1st and 2nd operand##		OP		class + type of 1st operand and # of args##		default		class + subclass####	escape byte:##		CORE		1 byte opcodes in all VAXen##		NEW		1 byte opcodes only in newer VAXen##		ESCD		2 byte opcodes, escape byte of 0xFD, newer VAXen##		ESCF		2 byte opcodes, escape byte of 0xFF, newer VAXen##	code byte##	number of arguments##	Access type##		A		for address, only in memory##		V		for address [sic], either in memory or register##		W		for writing##		R		for reading##		M		for modifying##		B		for branch displacement##		I		for xfc code##	Data types##		B	byte##		W	word##		L	long##		Q	quad##		O	octa##		F	f_float##		D	d_float##		G	g_float##		H	h_float####	The order of instructions in this table is not critical;##	the clients take care of their own table construction and ordering.##	The instructions are grouped (more or less) into functional groups.####	The following is the awk program to interpret this table.BEGIN{	flavor = AS;	##	##	magic padding before the string for AS	##	4 bytes of 0's: seek position of the string	##	2 bytes, value 2, indicating core resident	##	2 bytes, value 0, length	##	ASpad = "\\0\\0\\0\\0" "\\2\\0";}{	if (NF == 0){		printf("\n");		next;	}	if ($1 == "FLAVOR"){		flavor = $2;		if (flavor == "SDB"){			flavor = "ADB";		}		next;	}	if ($1 != "#"){		next;	}	if ($6 == "MACR"){		if (flavor == "ADB"){			next;		}		if (flavor == "AS"){			if ($4 == "CBR")				$4 = "IJXXX";			printf("PSEUDO(\"%s\\0%o\\0%s\",", ASpad,length($3),$3);			printf("%s, %s),\n", $7, $4);			next;		}		if (flavor == "C2"){			if ($5 == "C2X")				next;			printf("\"%s\",", $3);			if ($4 == "CBR" && $5 != "JBR"){				printf("T(CBR,%s),\n", $5);			} else {				printf("%s,\n", $5);			}			next;		}	}	if (flavor == "C2"){		printf("\"%s\",", $3);		if ($4 == "HARD"){		# 0 value			printf("0,\n");			next;		}		if ($5 == "S"){			# single value			printf("%s,\n", $4);			next;		}		if ($5 == "TN1"){		# use type of 1st operand			printf("T(%s,TYP%s),\n", $4, $10);			next;		}		if ($5 == "TN3"){		# use type of 3rd operand			printf("T(%s,TYP%s),\n", $4, $14);			next;		}		if ($5 == "TNX2"){		# cross product of 1st and 2nd operand			printf("T(%s,U(TYP%s,TYP%s)),\n", $4, $10, $12);			next;		}		if ($5 == "OP"){		# arithmetic operator			printf("T(%s,U(TYP%s,OP%d)),\n", $4, $10, $8);			next;		}		printf("T(%s,%s),\n", $4, $5);	# special value		next;	}	if (flavor == "AS"){		printf("OP(\"%s\\0%o\\0%s\", ", ASpad, length($3), $3);		printf("%s, %s, %d", $6, $7, $8);	} else {		printf("OP(\"%s\", %s, %s, %d", $3, $6, $7, $8);	}	if (flavor == "AS" || flavor == "ADB"){		for (i = 9; i+1 <= NF; i = i + 2){			printf(", A_%s%s", $i, $(i+1));		}		for (i = $8; i < 6; i++){			printf(",0");		}		printf("),\n");	}}####-------------------------------------------------------##1 2		3     4  	5    6	        7  8 9###### PSEUDO (MACR) operators come first## Data initializers# 000a .byte	IBYTE	C2X	MACR 0		VAR# 000b .word	IWORD	WGEN	MACR 0		VAR# 000c .int	IINT	LGEN	MACR 0		VAR# 000d .long	ILONG	LGEN	MACR 0		VAR# 000a .quad	IQUAD	C2X	MACR 0		VAR# 000a .octa	IOCTA	C2X	MACR 0		VAR# 000a .float	IFFLOAT	C2X	MACR 0		VAR# 000a .double	IDFLOAT	C2X	MACR 0		VAR# 000a .ffloat	IFFLOAT	C2X	MACR 0		VAR# 000a .dfloat	IDFLOAT	C2X	MACR 0		VAR# 000a .gfloat	IGFLOAT	C2X	MACR 0		VAR# 000a .hfloat	IHFLOAT	C2X	MACR 0		VAR# 000a .space	ISPACE	C2X	MACR 0		1# 000a .fill	IFILL	C2X	MACR 0		2# 000a .ascii	IASCII	C2X	MACR 0		VAR# 000a .asciz	IASCIZ	C2X	MACR 0		VAR# 000a .data	IDATA	DATA	MACR 0		1# 000a .text	ITEXT	TEXT	MACR 0		1# 000a .align	IALIGN	ALIGN	MACR 0		1	# 000a .line	ILINENO	C2X	MACR 0		1# 000a .file	IFILE	C2X	MACR 0		1# 000a .globl	IGLOBAL	EROU	MACR 0		1# 000a .comm	ICOMM	COMM	MACR 0		2# 000a .lcomm	ILCOMM	LCOMM	MACR 0		2# 000a .set	ISET	SET	MACR 0		2# 000a .lsym	ILSYM	C2X	MACR 0		2# 000a .org	IORG	C2X	MACR 0		1# 000a .stab	ISTAB	STAB	MACR 0		6# 000a .stabd	ISTABDOT	STAB	MACR 0	3# 000a .stabn	ISTABNONE	STAB	MACR 0	3# 000a .stabs	ISTABSTR	STAB	MACR 0	3# 000a .ABORT	IABORT	C2X	MACR 0		0## Pseudo jumps# 000a jbc	CBR	JBC	MACR 0xe1	1	B B# 000a jlbc	CBR	JLBC	MACR 0xe9	1	B B# 000a jbs	CBR	JBS	MACR 0xe0	1	B B# 000a jlbs	CBR	JLBS	MACR 0xe8	1	B B# 000a jbcc	CBR	JBCC	MACR 0xe5	1	B B# 000a jbsc	CBR	JBSC	MACR 0xe4	1	B B# 000a jbcs	CBR	JBCS	MACR 0xe3	1	B B# 000a jbss	CBR	JBSS	MACR 0xe2	1	B B# 000a jbr	CBR	JBR	MACR 0x11	1	B B# 000a jcc	CBR	C2X	MACR 0x1e	1	B B# 000a jcs	CBR	C2X	MACR 0x1f	1	B B# 000a jvc	CBR	C2X	MACR 0x1c	1	B B# 000a jvs	CBR	C2X	MACR 0x1d	1	B B# 000a jlss	CBR	JLT	MACR 0x19	1	B B# 000a jlssu	CBR	JLO	MACR 0x1f	1	B B# 000a jleq	CBR	JLE	MACR 0x15	1	B B# 000a jlequ	CBR	JLOS	MACR 0x1b	1	B B# 000a jeql	CBR	JEQ	MACR 0x13	1	B B# 000a jeqlu	CBR	JEQ	MACR 0x13	1	B B# 000a jneq	CBR	JNE	MACR 0x12	1	B B# 000a jnequ	CBR	JNE	MACR 0x12	1	B B# 000a jgeq	CBR	JGE	MACR 0x18	1	B B# 000a jgequ	CBR	JHIS	MACR 0x1e	1	B B# 000a jgtr	CBR	JGT	MACR 0x14	1	B B# 000a jgtru	CBR	JHI	MACR 0x1a	1	B B#### Registers### 000a r0	REG	C2X	MACR 0		0# 000a r1	REG	C2X	MACR 1		0# 000a r2	REG	C2X	MACR 2		0# 000a r3	REG	C2X	MACR 3		0# 000a r4	REG	C2X	MACR 4		0# 000a r5	REG	C2X	MACR 5		0# 000a r6	REG	C2X	MACR 6		0# 000a r7	REG	C2X	MACR 7		0# 000a r8	REG	C2X	MACR 8		0# 000a r9	REG	C2X	MACR 9		0# 000a r10	REG	C2X	MACR 10		0# 000a r11	REG	C2X	MACR 11		0# 000a r12	REG	C2X	MACR 12		0# 000a r13	REG	C2X	MACR 13		0# 000a r14	REG	C2X	MACR 14		0

⌨️ 快捷键说明

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