mirror of
https://github.com/PDP-10/its.git
synced 2026-01-13 15:27:28 +00:00
250 lines
12 KiB
Plaintext
250 lines
12 KiB
Plaintext
Abstract Machine Operators
|
||
|
||
|
||
|
||
|
||
|
||
|
||
The operations of the abstract machine are represented in the
|
||
intermediate language as three-address instructions; the
|
||
operators of these instructions, called abstract machine
|
||
operators (AMOPs), are described in the tables below. For each
|
||
AMOP is listed its opcode (in octal), its symbolic representation
|
||
in the machine description, the types of its operands and result,
|
||
and a description of the basic operation involved. The type
|
||
entry consists of a list of types for the first operand, second
|
||
operand (if any), and result of an AMOP, in that order; the types
|
||
are taken from the following list of abbreviations:
|
||
|
||
c character
|
||
i integer
|
||
f floating-point
|
||
d double-precision floating-point
|
||
x any type
|
||
p any pointer
|
||
p0 class 0 pointer
|
||
p1 class 1 pointer
|
||
p2 class 2 pointer
|
||
p3 class 3 pointer
|
||
l a location (the result of a jump)
|
||
|
||
The following notes are referenced in the AMOP tables:
|
||
|
||
1 - This AMOP should be defined only if the
|
||
corresponding pointer classes are defined.
|
||
2 - The definition of this AMOP is optional.
|
||
3 - OPLOCs should not be specified for this AMOP.
|
||
4 - This AMOP is used only in the tree
|
||
representation of expressions internal to the
|
||
code generation phase: it should not appear
|
||
in the machine description.
|
||
5 - This AMOP causes a side-effect on its (first)
|
||
operand, which must be an lvalue; therefore,
|
||
all OPLOCs for this AMOP must specify memory
|
||
as the location of the (first) operand.
|
||
6 - The result location must be specified as the
|
||
first argument location; the result value is
|
||
not actually used.
|
||
Abstract Machine Operators - 2 - 4 April 1978
|
||
|
||
|
||
opcode symbol types notes basic operation
|
||
|
||
0000 -ui i,i unary minus
|
||
0001 -ud d,d unary minus
|
||
0002 ++bi i,i 2,5 pre-increment
|
||
0003 ++ai i,i 2,5 post-increment
|
||
0004 --bi i,i 2,5 pre-decrement
|
||
0005 --ai i,i 2,5 post-decrement
|
||
0006 .BNOT i,i bitwise negation
|
||
0007 ! x,i 4 truth-value negation
|
||
0010 .LSEQ x,x,x 4 sequence; return left operand
|
||
0012 .sw i,i switch
|
||
0013 ++bc c,i 2,5 pre-increment
|
||
0014 ++ac c,i 2,5 post-increment
|
||
0015 --bc c,i 2,5 pre-decrement
|
||
0016 --ac c,i 2,5 post-decrement
|
||
0017 &u0 x,p0 address of
|
||
0020 &u1 x,p1 1 address of
|
||
0021 &u2 x,p2 1 address of
|
||
0022 &u3 x,p3 1 address of
|
||
0023 *u p,x 4 indirection
|
||
0024 ==0p0 p0,l 2 jump on null pointer
|
||
0025 ==0p1 p1,l 1,2 jump on null pointer
|
||
0026 ==0p2 p2,l 1,2 jump on null pointer
|
||
0027 ==0p3 p3,l 1,2 jump on null pointer
|
||
0030 !=0p0 p0,l 2 jump on non-null pointer
|
||
0031 !=0p1 p1,l 1,2 jump on non-null pointer
|
||
0032 !=0p2 p2,l 1,2 jump on non-null pointer
|
||
0033 !=0p3 p3,l 1,2 jump on non-null pointer
|
||
Abstract Machine Operators - 3 - 4 April 1978
|
||
|
||
|
||
opcode symbol types notes basic operation
|
||
|
||
0040 .ci c,i convert c to i
|
||
0041 .cf c,f convert c to f
|
||
0042 .cd c,d convert c to d
|
||
0043 .ic i,c convert i to c
|
||
0044 .if i,f convert i to f
|
||
0045 .id i,d convert i to d
|
||
0046 .ip0 i,p0 convert i to p0
|
||
0047 .ip1 i,p1 1 convert i to p1
|
||
0050 .ip2 i,p2 1 convert i to p2
|
||
0051 .ip3 i,p3 1 convert i to p3
|
||
0052 .fc f,c convert f to c
|
||
0053 .fi f,i convert f to i
|
||
0054 .fd f,d convert f to d
|
||
0055 .dc d,c convert d to c
|
||
0056 .di d,i convert d to i
|
||
0057 .df d,f convert d to f
|
||
0060 .p0i p0,i convert p0 to i
|
||
0061 .p0p1 p0,p1 1 convert p0 to p1
|
||
0062 .p0p2 p0,p2 1 convert p0 to p2
|
||
0063 .p0p3 p0,p3 1 convert p0 to p3
|
||
0064 .p1i p1,i 1 convert p1 to i
|
||
0065 .p1p0 p1,p0 1 convert p1 to p0
|
||
0066 .p1p2 p1,p2 1 convert p1 to p2
|
||
0067 .p1p3 p1,p3 1 convert p1 to p3
|
||
0070 .p2i p2,i 1 convert p2 to i
|
||
0071 .p2p0 p2,p0 1 convert p2 to p0
|
||
0072 .p2p1 p2,p1 1 convert p2 to p1
|
||
0073 .p2p3 p2,p3 1 convert p2 to p3
|
||
0074 .p3i p3,i 1 convert p3 to i
|
||
0075 .p3p0 p3,p0 1 convert p3 to p0
|
||
0076 .p3p1 p3,p1 1 convert p3 to p1
|
||
0077 .p3p2 p3,p2 1 convert p3 to p2
|
||
Abstract Machine Operators - 4 - 4 April 1978
|
||
|
||
|
||
opcode symbol types notes basic operation
|
||
|
||
0100 +i i,i,i addition
|
||
0101 =+i i,i,i 2,5 addition-assignment
|
||
0102 +d d,d,d addition
|
||
0103 =+d d,d,d 2,5 addition-assignment
|
||
0104 -i i,i,i subtraction
|
||
0105 =-i i,i,i 2,5 subtraction-assignment
|
||
0106 -d d,d,d subtraction
|
||
0107 =-d d,d,d 2,5 subtraction-assignment
|
||
0110 *i i,i,i multiplication
|
||
0111 =*i i,i,i 2,5 multiplication-assignment
|
||
0112 *d d,d,d multiplication
|
||
0113 =*d d,d,d 2,5 multiplication-assignment
|
||
0114 /i i,i,i division
|
||
0115 =/i i,i,i 2,5 division-assignment
|
||
0116 /d d,d,d division
|
||
0117 =/d d,d,d 2,5 division-assignment
|
||
0120 % i,i,i modulo
|
||
0121 =% i,i,i 2,5 modulo-assignment
|
||
0122 << i,i,i left-shift
|
||
0123 =<< i,i,i 2,5 left-shift-assignment
|
||
0124 >> i,i,i right-shift
|
||
0125 =>> i,i,i 2,5 right-shift-assignment
|
||
0126 & i,i,i bitwise AND
|
||
0127 =& i,i,i 2,5 bitwise AND-assignment
|
||
0130 ^ i,i,i bitwise XOR
|
||
0131 =^ i,i,i 2,5 bitwise XOR-assignment
|
||
0132 .OR i,i,i bitwise OR
|
||
0133 =OR i,i,i 2,5 bitwise OR-assignment
|
||
0134 && x,x,i 4 truth-value AND
|
||
0135 .TVOR x,x,i 4 truth-value OR
|
||
0136 -p0p0 p0,p0,i pointer subtraction
|
||
0137 = x,x,x 4 assignment
|
||
0140 .argi i,,i 2,6 integer argument
|
||
0141 .argd d,,d 2,6 double argument
|
||
0142 .arg0 p0,,p0 2,6 pointer class 0 argument
|
||
0143 .arg1 p1,,p1 1,2,6 pointer class 1 argument
|
||
0144 .arg2 p2,,p2 1,2,6 pointer class 2 argument
|
||
0145 .arg3 p3,,p3 1,2,6 pointer class 3 argument
|
||
0146 +p0 p0,i,p0 increment pointer by
|
||
0147 +p1 p1,i,p1 1 increment pointer by
|
||
0150 +p2 p2,i,p2 1 increment pointer by
|
||
0151 +p3 p3,i,p3 1 increment pointer by
|
||
0152 -p0 p0,i,p0 decrement pointer by
|
||
0153 -p1 p1,i,p1 1 decrement pointer by
|
||
0154 -p2 p2,i,p2 1 decrement pointer by
|
||
0155 -p3 p3,i,p3 1 decrement pointer by
|
||
Abstract Machine Operators - 5 - 4 April 1978
|
||
|
||
|
||
opcode symbol types notes basic operation
|
||
|
||
0160 .cc c,c 3 move character
|
||
0161 .ii i,i 3 move integer
|
||
0162 .ff f,f 3 move float
|
||
0163 .dd d,d 3 move double
|
||
0164 .p0p0 p0,p0 3 move pointer p0
|
||
0165 .p1p1 p1,p1 1,3 move pointer p1
|
||
0166 .p2p2 p2,p2 1,3 move pointer p2
|
||
0167 .p3p3 p3,p3 1,3 move pointer p3
|
||
0170 , x,x,x 4 sequence; return right operand
|
||
0171 ? x,x,x 4 conditional
|
||
0172 : x,x,x 4 conditional
|
||
0200 ==i i,i,l jump on equal
|
||
0201 !=i i,i,l jump on not equal
|
||
0202 <i i,i,l jump on less than
|
||
0203 >i i,i,l jump on greater than
|
||
0204 <=i i,i,l jump on less than or equal
|
||
0205 >=i i,i,l jump on greater than or equal
|
||
0206 ==d d,d,l
|
||
0207 !=d d,d,l
|
||
0210 <d d,d,l
|
||
0211 >d d,d,l
|
||
0212 <=d d,d,l
|
||
0213 >=d d,d,l
|
||
0214 ==p0 p0,p0,l
|
||
0215 !=p0 p0,p0,l
|
||
0216 <p0 p0,p0,l
|
||
0217 >p0 p0,p0,l
|
||
0220 <=p0 p0,p0,l
|
||
0221 >=p0 p0,p0,l
|
||
0222 ==p1 p1,p1,l 1,2
|
||
0223 !=p1 p1,p1,l 1,2
|
||
0224 <p1 p1,p1,l 1,2
|
||
0225 >p1 p1,p1,l 1,2
|
||
0226 <=p1 p1,p1,l 1,2
|
||
0227 >=p1 p1,p1,l 1,2
|
||
0230 ==p2 p2,p2,l 1,2
|
||
0231 !=p2 p2,p2,l 1,2
|
||
0232 <p2 p2,p2,l 1,2
|
||
0233 >p2 p2,p2,l 1,2
|
||
0234 <=p2 p2,p2,l 1,2
|
||
0235 >=p2 p2,p2,l 1,2
|
||
0236 ==p3 p3,p3,l 1,2
|
||
0237 !=p3 p3,p3,l 1,2
|
||
0240 <p3 p3,p3,l 1,2
|
||
0241 >p3 p3,p3,l 1,2
|
||
0242 <=p3 p3,p3,l 1,2
|
||
0243 >=p3 p3,p3,l 1,2
|
||
Abstract Machine Operators - 6 - 4 April 1978
|
||
|
||
|
||
opcode symbol types notes basic operation
|
||
|
||
0250 ++bf f,,f 2,5 pre-increment
|
||
0251 ++af f,,f 2,5 post-increment
|
||
0252 --bf f,,f 2,5 pre-decrement
|
||
0253 --af f,,f 2,5 post-decrement
|
||
0254 ++bd d,,d 2,5 pre-increment
|
||
0255 ++ad d,,d 2,5 post-increment
|
||
0256 --bd d,,d 2,5 pre-decrement
|
||
0257 --ad d,,d 2,5 post-decrement
|
||
0260 ++bp0 p0,i,p0 2,5 pre-increment by
|
||
0261 ++ap0 p0,i,p0 2,5 post-increment by
|
||
0262 --bp0 p0,i,p0 2,5 pre-decrement by
|
||
0263 --ap0 p0,i,p0 2,5 post-decrement by
|
||
0264 ++bp1 p1,i,p1 1,2,5 pre-increment by
|
||
0265 ++ap1 p1,i,p1 1,2,5 post-increment by
|
||
0266 --bp1 p1,i,p1 1,2,5 pre-decrement by
|
||
0267 --ap1 p1,i,p1 1,2,5 post-decrement by
|
||
0270 ++bp2 p2,i,p2 1,2,5 pre-increment by
|
||
0271 ++ap2 p2,i,p2 1,2,5 post-increment by
|
||
0272 --bp2 p2,i,p2 1,2,5 pre-decrement by
|
||
0273 --ap2 p2,i,p2 1,2,5 post-decrement by
|
||
0274 ++bp3 p3,i,p3 1,2,5 pre-increment by
|
||
0275 ++ap3 p3,i,p3 1,2,5 post-increment by
|
||
0276 --bp3 p3,i,p3 1,2,5 pre-decrement by
|
||
0277 --ap3 p3,i,p3 1,2,5 post-decrement by
|
||
|