"addi 2, 0, 0x0008",
"addi 5, 0, 0x1234",
"addi 6, 0, 0x1235",
- "sv.stw 5.v, 0(1.v)",
- "sv.lwz 9.v, 0(1.v)"])
+ "svstw 5.v, 0(1.v)",
+ "svlwz 9.v, 0(1.v)"])
lst = list(lst)
# SVSTATE (in this case, VL=2)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321+0x1234
# 2 = 6 + 10 => 0x3334 = 0x2223+0x1111
- isa = SVP64Asm(['sv.add 1.v, 5.v, 9.v'
+ isa = SVP64Asm(['svadd 1.v, 5.v, 9.v'
])
lst = list(isa)
print ("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321+0x1234
# r1 is scalar so ENDS EARLY
- isa = SVP64Asm(['sv.add 1, 5.v, 9.v'
+ isa = SVP64Asm(['svadd 1, 5.v, 9.v'
])
lst = list(isa)
print ("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321+0x1234
# 2 = 5 + 10 => 0x5432 = 0x4321+0x1111
- isa = SVP64Asm(['sv.add 1.v, 5, 9.v'
+ isa = SVP64Asm(['svadd 1.v, 5, 9.v'
])
lst = list(isa)
print ("listing", lst)
def test_sv_add_vl_0(self):
# adds:
# none because VL is zer0
- isa = SVP64Asm(['sv.add 1, 5.v, 9.v'
+ isa = SVP64Asm(['svadd 1, 5.v, 9.v'
])
lst = list(isa)
print ("listing", lst)
# adds when Rc=1: TODO CRs higher up
# 1 = 5 + 9 => 0 = -1+1 CR0=0b100
# 2 = 6 + 10 => 0x3334 = 0x2223+0x1111 CR1=0b010
- isa = SVP64Asm(['sv.add. 1.v, 5.v, 9.v'
+ isa = SVP64Asm(['svadd. 1.v, 5.v, 9.v'
])
lst = list(isa)
print ("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321 + 0x1234
# 2 = 6 + 10 => 0x3334 = 0x2223 + 0x1111
- isa = SVP64Asm(['sv.add 1.v, 5.v, 9.v'])
+ isa = SVP64Asm(['svadd 1.v, 5.v, 9.v'])
lst = list(isa)
print("listing", lst)
def case_2_sv_add_scalar(self):
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321 + 0x1234
- isa = SVP64Asm(['sv.add 1, 5, 9'])
+ isa = SVP64Asm(['svadd 1, 5, 9'])
lst = list(isa)
print("listing", lst)
def case_3_sv_check_extra(self):
# adds:
# 13 = 10 + 7 => 0x4242 = 0x1230 + 0x3012
- isa = SVP64Asm(['sv.add 13.v, 10.v, 7.v'])
+ isa = SVP64Asm(['svadd 13.v, 10.v, 7.v'])
lst = list(isa)
print("listing", lst)
# 1 = 5 + 9 => 0 = -1+1 CR0=0b100
# 2 = 6 + 10 => 0x3334 = 0x2223+0x1111 CR1=0b010
- isa = SVP64Asm(['sv.add. 1.v, 5.v, 9.v'])
+ isa = SVP64Asm(['svadd. 1.v, 5.v, 9.v'])
lst = list(isa)
print("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321 + 0x1234
isa = SVP64Asm([
- 'sv.add 13.v, 10.v, 7.v', # skipped, because VL == 0
+ 'svadd 13.v, 10.v, 7.v', # skipped, because VL == 0
'add 1, 5, 9'
])
lst = list(isa)
# 14 = 11 + 8 => 0x3012 = 0x3012 + 0x0000
# 15 = 12 + 9 => 0x1234 = 0x0000 + 0x1234
isa = SVP64Asm([
- 'sv.add 1.v, 5.v, 9.v',
- 'sv.add 13.v, 10.v, 7.v'
+ 'svadd 1.v, 5.v, 9.v',
+ 'svadd 13.v, 10.v, 7.v'
])
lst = list(isa)
print("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321 + 0x1234
# r1 is scalar so ENDS EARLY
- isa = SVP64Asm(['sv.add 1, 5.v, 9.v'])
+ isa = SVP64Asm(['svadd 1, 5.v, 9.v'])
lst = list(isa)
print("listing", lst)
# adds:
# 1 = 5 + 9 => 0x5555 = 0x4321+0x1234
# 2 = 5 + 10 => 0x5432 = 0x4321+0x1111
- isa = SVP64Asm(['sv.add 1.v, 5, 9.v'])
+ isa = SVP64Asm(['svadd 1.v, 5, 9.v'])
lst = list(isa)
print("listing", lst)