case 0x8000: /* SSM */ goto unimplemented;
case 0x8200: /* LPSW */ goto unimplemented;
case 0x9300: /* TS */ goto unimplemented;
+ case 0xb200: /* LBEAR */ goto unimplemented;
+ case 0xb201: /* STBEAR */ goto unimplemented;
case 0xb202: /* STIDP */ goto unimplemented;
case 0xb204: /* SCK */ goto unimplemented;
case 0xb205: s390_format_S_RD(s390_irgen_STCK, S_b2(ovl), S_d2(ovl));
case 0xb286: /* QSI */ goto unimplemented;
case 0xb287: /* LSCTL */ goto unimplemented;
case 0xb28e: /* QCTRI */ goto unimplemented;
+ case 0xb28f: /* QPACI */ goto unimplemented;
case 0xb299: s390_format_S_RD(s390_irgen_SRNM, S_b2(ovl), S_d2(ovl));
goto ok;
case 0xb29c: s390_format_S_RD(s390_irgen_STFPC, S_b2(ovl), S_d2(ovl));
case 0xb938: /* SORTL */ goto unimplemented;
case 0xb939: /* DFLTCC */ goto unimplemented;
case 0xb93a: /* KDSA */ goto unimplemented;
+ case 0xb93b: /* NNPA */ goto unimplemented;
case 0xb93c: s390_format_RRE_RR(s390_irgen_PPNO, RRE_r1(ovl),
RRE_r2(ovl)); goto ok;
case 0xb93e: /* KIMD */ goto unimplemented;
case 0xb989: s390_format_RRE_RR(s390_irgen_SLBGR, RRE_r1(ovl),
RRE_r2(ovl)); goto ok;
case 0xb98a: /* CSPG */ goto unimplemented;
+ case 0xb98b: /* RDP */ goto unimplemented;
case 0xb98d: /* EPSW */ goto unimplemented;
case 0xb98e: /* IDTE */ goto unimplemented;
case 0xb98f: /* CRDTE */ goto unimplemented;
VRS_rxb(ovl)); goto ok;
case 0xe60000000049ULL: /* VLIP */ goto unimplemented;
case 0xe60000000050ULL: /* VCVB */ goto unimplemented;
+ case 0xe60000000051ULL: /* VCLZDP */ goto unimplemented;
case 0xe60000000052ULL: /* VCVBG */ goto unimplemented;
+ case 0xe60000000054ULL: /* VUPKZH */ goto unimplemented;
case 0xe60000000055ULL: s390_format_VRRa_VVMM(s390_irgen_VCNF,
VRRa_v1(ovl), VRRa_v2(ovl),
VRRa_m3(ovl), VRRa_m4(ovl),
case 0xe60000000059ULL: /* VSRP */ goto unimplemented;
case 0xe6000000005aULL: /* VCVDG */ goto unimplemented;
case 0xe6000000005bULL: /* VPSOP */ goto unimplemented;
+ case 0xe6000000005cULL: /* VUPKZL */ goto unimplemented;
case 0xe6000000005fULL: /* VTP */ goto unimplemented;
+ case 0xe60000000070ULL: /* VPKZR */ goto unimplemented;
case 0xe60000000071ULL: /* VAP */ goto unimplemented;
+ case 0xe60000000072ULL: /* VSRPR */ goto unimplemented;
case 0xe60000000073ULL: /* VSP */ goto unimplemented;
case 0xe60000000075ULL: s390_format_VRRa_VVVMM(s390_irgen_VCRNF,
VRRa_v1(ovl), VRRa_v2(ovl),
case 0xe60000000077ULL: /* VCP */ goto unimplemented;
case 0xe60000000078ULL: /* VMP */ goto unimplemented;
case 0xe60000000079ULL: /* VMSP */ goto unimplemented;
+ case 0xe60000000074ULL: /* VSCHP */ goto unimplemented;
case 0xe6000000007aULL: /* VDP */ goto unimplemented;
case 0xe6000000007bULL: /* VRP */ goto unimplemented;
+ case 0xe6000000007cULL: /* VSCSHP */ goto unimplemented;
+ case 0xe6000000007dULL: /* VCSPH */ goto unimplemented;
case 0xe6000000007eULL: /* VSDP */ goto unimplemented;
case 0xe70000000000ULL: s390_format_VRX_VRRDM(s390_irgen_VLEB, VRX_v1(ovl),
VRX_x2(ovl), VRX_b2(ovl),
case 0xeb000000006eULL: s390_format_SIY_IRD(s390_irgen_ALSI, SIY_i2(ovl),
SIY_b1(ovl), SIY_dl1(ovl),
SIY_dh1(ovl)); goto ok;
+ case 0xeb0000000071ULL: /* LPSWEY */ goto unimplemented;
case 0xeb000000007aULL: s390_format_SIY_IRD(s390_irgen_AGSI, SIY_i2(ovl),
SIY_b1(ovl), SIY_dl1(ovl),
SIY_dh1(ovl)); goto ok;
#------------------------------------------------------------------
my $num_arg = $#ARGV + 1;
-if ($num_arg != 3) {
+my $csv_file;
+my $opc_file;
+my $toir_file;
+
+if ($num_arg == 0) {
+ my $cwd = `pwd`;
+ my ($basedir) = $cwd =~ m|(.*)/valgrind/|;
+ $csv_file = "$basedir/valgrind/docs/internals/s390-opcodes.csv";
+ $opc_file = "$basedir/binutils-gdb/opcodes/s390-opc.txt";
+ $toir_file = "$basedir/valgrind/VEX/priv/guest_s390_toIR.c";
+} elsif ($num_arg == 3) {
+ $csv_file = $ARGV[0];
+ $opc_file = $ARGV[1];
+ $toir_file = $ARGV[2];
+} else {
die "usage: s390-check-opcodes s390-opcodes.csv s390-opc.txt guest_s390_toIR.c\n";
}
-my $csv_file = $ARGV[0];
-my $opc_file = $ARGV[1];
-my $toir_file = $ARGV[2];
-
my %opc_desc = ();
my %csv_desc = ();
my %csv_implemented = ();
my @extended_mnemonics = (
"bi", # extended mnemonic for bic
'brul?',
+ 'jc', # brc
'jasl?',
- 'jctg?',
+ 'jct[gh]?',
'jg?nop',
'jxleg?',
'jxhg?',
'l[de]rv',
+ 'lfi', # iilf
+ 'llg[fh]i', # llilf, llill
+ 'notg?r', # nork, nogrk
'risbgn?z',
+ 'risb[hl]gz',
+ 'r[onx]sbgt',
'st[de]rv',
"va[bhfgq]",
"vacc[bhfgq]",
"vsbcbiq",
"vsbiq",
"vscbi[bhfgq]",
+ "vsch[sdx]p", # vschp (short/long/extended)
"vseg[bfh]",
'vstbr[hfgq]',
'vster[hfg]',
#----------------------------------------------------
foreach my $opc (keys %opc_desc) {
if (defined $csv_desc{$opc}) {
- if ($opc_desc{$opc} ne $csv_desc{$opc}) {
+ if (lc($opc_desc{$opc}) ne lc($csv_desc{$opc})) {
print "*** opcode $opc differs:\n";
- print " binutils: $opc_desc{$opc}\n";
+ print " binutils: $opc_desc{$opc}\n";
print " opcodes.csv: $csv_desc{$opc}\n";
}
}
dfltcc,"deflate conversion call","not implemented",arch13
sortl,"sort lists","not implemented",arch13
kdsa,"compute digital signature authentication","not implemented",arch13
+vschp,"decimal scale and convert to hfp","not implemented",arch14
+vscshp,"decimal scale and convert and split to hfp","not implemented",arch14
+vcsph,"vector convert hfp to scaled decimal","not implemented",arch14
+vclzdp,"vector count leading zero digits","not implemented",arch14
+vpkzr,"vector pack zoned register","not implemented",arch14
+vsrpr,"vector shift and round decimal register","not implemented",arch14
+vupkzh,"vector unpack zoned high","not implemented",arch14
+vupkzl,"vector unpack zoned low","not implemented",arch14
+nnpa,"neural network processing assist","not implemented",arch14
+vclfnh,"vector fp convert and lengthen from nnp high","implemented",arch14
+vclfnl,"vector fp convert and lengthen from nnp low","implemented",arch14
+vcrnf,"vector fp convert and round to nnp","implemented",arch14
+vcfn,"vector fp convert from nnp","implemented",arch14
+vcnf,"vector fp convert to nnp","implemented",arch14
+rdp,"reset dat protection",N/A,"privileged instruction"
+lpswey,"load PSW extended",N/A,"privileged instruction"
+lbear,"load bear",N/A,"privileged instruction"
+stbear,"store bear",N/A,"privileged instruction"
+qpaci,"query processor activity counter information",N/A,"privileged instruction"