opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry out,ldst len,BR,sgn ext,upd,rsrv,32b,sgn,rc,lk,sgl pipe,comment,form,CONDITIONS,unofficial,comment2
-0b000000,VL,OP_SETVL,RA_OR_ZERO,NONE,NONE,RT_OR_ZERO,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,setvl,SVL,,1,unofficial until submitted and approved/renumbered by the opf isa wg
-0b000001,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svshape,SVM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
-0b000010,VL,OP_SVREMAP,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svremap,SVRM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
-0b000011,VL,OP_SVSTEP,NONE,NONE,NONE,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svstep,SVL,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+0b00000,VL,OP_SETVL,RA_OR_ZERO,NONE,NONE,RT_OR_ZERO,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,setvl,SVL,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+0b00001,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svshape,SVM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+0b00010,VL,OP_SVREMAP,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svremap,SVRM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+0b00011,VL,OP_SVSTEP,NONE,NONE,NONE,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,svstep,SVL,,1,unofficial until submitted and approved/renumbered by the opf isa wg
# and svshape. note that the dimension fields one subtracted from each
if opcode == 'svshape':
# 1.6.33 SVM-FORM from fields.txt
- # |0 |6 |11 |16 |21 |25 |26 |31 |
- # | PO | SVxd | SVyd | SVzd | SVRM |vf | XO |
+ # |0 |6 |11 |16 |21 |25 |26 |31 |
+ # |PO | SVxd | SVyd | SVzd | SVRM |vf | XO | / |
insn = 22 << (31-5) # opcode 22, bits 0-5
fields = list(map(int, fields))
insn |= (fields[0]-1) << (31-10) # SVxd , bits 6-10
insn |= (fields[1]-1) << (31-15) # SVyd , bits 11-15
insn |= (fields[2]-1) << (31-20) # SVzd , bits 16-20
- insn |= (fields[3]) << (31-24) # SVRM , bits 21-24
- insn |= (fields[4]) << (31-25) # vf , bits 25
- insn |= 0b00001 << (31-31) # XO , bits 26..31
+ insn |= (fields[3]) << (31-24) # SVRM , bits 21-24
+ insn |= (fields[4]) << (31-25) # vf , bits 25
+ insn |= 0b00001 << (31-30) # XO , bits 26..30
#insn &= ((1<<32)-1)
log("svshape", bin(insn))
yield ".long 0x%x" % insn
if opcode == 'svremap':
# 1.6.34 SVRM-FORM from fields.txt
# |0 |6 |11 |13 |15 |17 |19 |21 |22 |26 |31 |
- # |PO | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |/// | XO |
+ # |PO | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |/// | XO | / |
insn = 22 << (31-5) # opcode 22, bits 0-5
fields = list(map(int, fields))
insn |= fields[0] << (31-10) # SVme , bits 6-10
insn |= fields[4] << (31-18) # m00 , bits 17-18
insn |= fields[5] << (31-20) # m01 , bits 19-20
insn |= fields[6] << (31-21) # pst , bit 21
- insn |= 0b00010 << (31-31) # XO , bits 26..30
+ insn |= 0b00010 << (31-30) # XO , bits 26..30
#insn &= ((1<<32)-1)
log("svremap", bin(insn))
yield ".long 0x%x" % insn