This commit is contained in:
Kovid Goyal 2024-02-01 22:38:55 +05:30
parent 55c909c656
commit d5cd9ef2ca
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 4 deletions

View file

@ -781,7 +781,7 @@ func (f *Function) Set1Epi8(val any, vec Register) {
case 256:
temp := f.Vec(128)
defer f.ReleaseReg(temp)
f.instr("MOVL", r, temp)
f.instr("VMOVD", r, temp)
f.instr("VPBROADCASTB", temp, vec)
}
}
@ -798,7 +798,7 @@ func (f *Function) Set1Epi8(val any, vec Register) {
case 256:
temp := f.Vec(128)
defer f.ReleaseReg(temp)
f.instr("MOVL", v, temp)
f.instr("VMOVD", v, temp)
f.instr("VPBROADCASTB", temp, vec)
}
}

View file

@ -185,7 +185,7 @@ func TestSIMDStringOps(t *testing.T) {
actual = index_c0_asm_256(haystack)
}
if actual != expected {
t.Fatalf("Failed to find C0 char in: %#v (%d != %d) at size: %d", string(haystack), expected, actual, sz)
t.Fatalf("C0 char index failed in: %#v (%d != %d) at size: %d", string(haystack), expected, actual, sz)
}
}
@ -201,10 +201,10 @@ func TestSIMDStringOps(t *testing.T) {
c0tests("")
c0tests("abcdef")
c0tests("a\x00")
c0tests("afsgdfg\x7f")
c0tests("a\nfgdfgd\r")
c0tests("afgd\rfgd\t")
c0tests("a\x00")
}
func TestIntrinsics(t *testing.T) {