Skip to content

Commit 29d3900

Browse files
committed
PDP11: Document CIS register-form instructions
Only the string instructions document the registers used by the register-form instructions. Also document the BCD register-form instructions. Although, the operands have already been loaded into the special-purpose instructions before the op switch, I think this documentation is useful.
1 parent 319f07f commit 29d3900

File tree

1 file changed

+46
-16
lines changed

1 file changed

+46
-16
lines changed

PDP11/pdp11_cis.c

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,11 @@ switch (op) { /* case on opcode */
470470

471471
/* MOVRC, MOVRCI
472472
473-
Operands (MOVC, MOVTC):
473+
Operands (MOVRC):
474474
R0, R1 = source string descriptor
475475
R2, R3 = dest string descriptor
476476
R4<7:0> = fill character
477-
Operands (MOVCI, MOVTCI):
477+
Operands (MOVRCI):
478478
A1LNT, A1ADR = source string descriptor
479479
A2LNT, A2ADR = dest string descriptor
480480
A3LNT<7:0> = fill character
@@ -754,8 +754,8 @@ switch (op) { /* case on opcode */
754754
R0, R1 = source string descriptor
755755
R2, R3 = substring descriptor
756756
Operands (MATCI):
757-
A1LNT, A1ADR = source1 string descriptor
758-
A2LNT, A2ADR = source2 string descriptor
757+
A1LNT, A1ADR = source string descriptor
758+
A2LNT, A2ADR = substring string descriptor
759759
760760
Condition codes:
761761
NZ = set from R0
@@ -818,7 +818,11 @@ switch (op) { /* case on opcode */
818818

819819
/* ADDN, SUBN, ADDP, SUBP, ADDNI, SUBNI, ADDPI, SUBPI
820820
821-
Operands:
821+
Operands (ADDN, SUBN, ADDP, SUBP):
822+
R0, R1 = source1 string descriptor
823+
R2, R3 = source2 string descriptor
824+
R4, R5 = destination string descriptor
825+
Operands (ADDNI, SUBNI, ADDPI, SUBPI):
822826
A1LNT, A1ADR = source1 string descriptor
823827
A2LNT, A2ADR = source2 string descriptor
824828
A3LNT, A3ADR = destination string descriptor
@@ -860,7 +864,11 @@ switch (op) { /* case on opcode */
860864

861865
/* MULP, MULPI
862866
863-
Operands:
867+
Operands (MULP):
868+
R0, R1 = source1 string descriptor
869+
R2, R3 = source2 string descriptor
870+
R4, R5 = destination string descriptor
871+
Operands (MULPI):
864872
A1LNT, A1ADR = source1 string descriptor
865873
A2LNT, A2ADR = source2 string descriptor
866874
A3LNT, A3ADR = destination string descriptor
@@ -898,7 +906,11 @@ switch (op) { /* case on opcode */
898906

899907
/* DIVP, DIVPI
900908
901-
Operands:
909+
Operands (DIVP):
910+
R0, R1 = divisor string descriptor
911+
R2, R3 = dividend string descriptor
912+
R4, R5 = destination string descriptor
913+
Operands (DIVPI):
902914
A1LNT, A1ADR = divisor string descriptor
903915
A2LNT, A2ADR = dividend string descriptor
904916
A3LNT, A3ADR = destination string descriptor
@@ -948,7 +960,10 @@ switch (op) { /* case on opcode */
948960

949961
/* CMPN, CMPP, CMPNI, CMPPI
950962
951-
Operands:
963+
Operands (CMPN, CMPP):
964+
R0, R1 = source1 string descriptor
965+
R2, R3 = source2 string descriptor
966+
Operands (CMPNI, CMPPI):
952967
A1LNT, A1ADR = source1 string descriptor
953968
A2LNT, A2ADR = source2 string descriptor
954969
@@ -979,7 +994,12 @@ switch (op) { /* case on opcode */
979994

980995
/* ASHN, ASHP, ASHNI, ASHPI
981996
982-
Operands:
997+
Operands (ASHN, ASHP):
998+
R0, R1 = source string descriptor
999+
R2, R3 = destination string descriptor
1000+
R4<11:8> = rounding digit
1001+
R4<7:0> = shift count
1002+
Operands (ASHNI, ASHPI):
9831003
A1LNT, A1ADR = source string descriptor
9841004
A2LNT, A2ADR = destination string descriptor
9851005
A3LNT<11:8> = rounding digit
@@ -1019,7 +1039,10 @@ switch (op) { /* case on opcode */
10191039

10201040
/* CVTPN, CVTPNI
10211041
1022-
Operands:
1042+
Operands (CVTPN):
1043+
R0, R1 = source string descriptor
1044+
R2, R3 = destination string descriptor
1045+
Operands (CVTPNI):
10231046
A1LNT, A1ADR = source string descriptor
10241047
A2LNT, A2ADR = destination string descriptor
10251048
@@ -1041,7 +1064,10 @@ switch (op) { /* case on opcode */
10411064

10421065
/* CVTNP, CVTNPI
10431066
1044-
Operands:
1067+
Operands (CVTNP):
1068+
R0, R1 = source string descriptor
1069+
R2, R3 = destination string descriptor
1070+
Operands (CVTNPI):
10451071
A1LNT, A1ADR = source string descriptor
10461072
A2LNT, A2ADR = destination string descriptor
10471073
@@ -1063,9 +1089,11 @@ switch (op) { /* case on opcode */
10631089

10641090
/* CVTNL, CVTPL, CVTNLI, CVTPLI
10651091
1066-
Operands:
1092+
Operands (CVTNL, CVTPL):
1093+
R0, R1 = source string descriptor
1094+
Operands (CVTNLI, CVTPLI):
10671095
A1LNT, A1ADR = source string descriptor
1068-
A2LNT = destination address (inline only)
1096+
A2LNT = destination address
10691097
10701098
Condition codes:
10711099
NZV = set from result
@@ -1109,10 +1137,12 @@ switch (op) { /* case on opcode */
11091137

11101138
/* CVTLN, CVTLP, CVTLNI, CVTLPI
11111139
1112-
Operands:
1140+
Operands (CVTLN, CVTLP):
1141+
R0, R1 = destination string descriptor
1142+
R2:R3 = source long - EIS format
1143+
Operands (CVTLNI, CVTLPI):
11131144
A1LNT, A1ADR = destination string descriptor
1114-
A2LNT, A2ADR = source long (CVTLNI, CVTLPI) - VAX format
1115-
R2:R3 = source long (CVTLN, CVTLP) - EIS format
1145+
A2LNT, A2ADR = source long - VAX format
11161146
11171147
Condition codes:
11181148
NZV = set from result

0 commit comments

Comments
 (0)