@@ -142,7 +142,7 @@ func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64)) strin
142
142
case LRVH :
143
143
op = "MOVHBR"
144
144
}
145
- case LA , LAY :
145
+ case LA , LAY , LARL :
146
146
args [0 ], args [1 ] = args [1 ], args [0 ]
147
147
op = "MOVD"
148
148
@@ -349,6 +349,17 @@ func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64)) strin
349
349
case SLBGR :
350
350
op = "SUBE"
351
351
args [0 ], args [1 ] = args [1 ], args [0 ]
352
+ case MADBR :
353
+ op = "FMADD"
354
+ args [0 ], args [1 ], args [2 ] = args [1 ], args [2 ], args [0 ]
355
+ case VFM :
356
+ op = "WFMDB"
357
+ args [0 ], args [1 ], args [2 ] = args [1 ], args [2 ], args [0 ]
358
+ args = args [0 :3 ]
359
+ case VFS :
360
+ op = "WFSDB"
361
+ args [0 ], args [1 ], args [2 ] = args [2 ], args [1 ], args [0 ]
362
+ args = args [0 :3 ]
352
363
case MSGFR , MHI , MSFI , MSGFI :
353
364
switch inst .Op {
354
365
case MSGFR , MHI , MSFI :
@@ -500,16 +511,16 @@ func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64)) strin
500
511
if err != nil {
501
512
return fmt .Sprintf ("GoSyntax: error in converting Atoi:%s" , err )
502
513
}
503
- opStr , check := branchOnConditionOp (mask , inst .Op )
514
+ opStr := branchOnConditionOp (mask , inst .Op )
504
515
if opStr != "" {
505
516
op = opStr
506
517
}
507
518
if op == "SYNC" || op == "NOPH" {
508
519
return op
509
520
}
510
- if check {
511
- args [ 0 ] = args [1 ]
512
- args = args [: 1 ]
521
+ if op == "RET" {
522
+ args = args [: 0 ]
523
+ return op
513
524
}
514
525
case LOCGR :
515
526
mask , err := strconv .Atoi (args [2 ][1 :])
@@ -1036,6 +1047,9 @@ func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64)) strin
1036
1047
// branch on relative mnemonic.
1037
1048
func branch_relative_op (mask int , opconst Op ) (op string , check bool ) {
1038
1049
switch mask & 0xf {
1050
+ case 1 :
1051
+ op = "BVS"
1052
+ check = true
1039
1053
case 2 :
1040
1054
op = "BGT"
1041
1055
check = true
@@ -1061,25 +1075,24 @@ func branch_relative_op(mask int, opconst Op) (op string, check bool) {
1061
1075
op = "BLEU"
1062
1076
check = true
1063
1077
case 15 :
1064
- op = "JMP" // BR
1078
+ op = "BR"
1065
1079
check = true
1066
1080
}
1067
1081
return op , check
1068
1082
}
1069
1083
1070
1084
// This function returns corresponding extended mnemonic for the given
1071
1085
// brach on condition mnemonic.
1072
- func branchOnConditionOp (mask int , opconst Op ) (op string , check bool ) {
1086
+ func branchOnConditionOp (mask int , opconst Op ) (op string ) {
1073
1087
switch mask & 0xf {
1074
1088
case 0 :
1075
1089
op = "NOPH"
1076
1090
case 14 :
1077
1091
op = "SYNC"
1078
1092
case 15 :
1079
- op = "JMP"
1080
- check = true
1093
+ op = "RET"
1081
1094
}
1082
- return op , check
1095
+ return op
1083
1096
}
1084
1097
1085
1098
// This function returns corresponding plan9 mnemonic for the native bitwise mnemonic.
@@ -1260,7 +1273,7 @@ func reverseOperandOrder(op Op) bool {
1260
1273
switch op {
1261
1274
case LOCR , MLGR :
1262
1275
return true
1263
- case LTEBR , LTDBR :
1276
+ case LTEBR , LTDBR , LCDBR , LGDR :
1264
1277
return true
1265
1278
case VLEIB , VLEIH , VLEIF , VLEIG , VPDI :
1266
1279
return true
0 commit comments