This commit is contained in:
Kovid Goyal
2024-02-01 22:38:55 +05:30
parent 55c909c656
commit d5cd9ef2ca
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: case 256:
temp := f.Vec(128) temp := f.Vec(128)
defer f.ReleaseReg(temp) defer f.ReleaseReg(temp)
f.instr("MOVL", r, temp) f.instr("VMOVD", r, temp)
f.instr("VPBROADCASTB", temp, vec) f.instr("VPBROADCASTB", temp, vec)
} }
} }
@@ -798,7 +798,7 @@ func (f *Function) Set1Epi8(val any, vec Register) {
case 256: case 256:
temp := f.Vec(128) temp := f.Vec(128)
defer f.ReleaseReg(temp) defer f.ReleaseReg(temp)
f.instr("MOVL", v, temp) f.instr("VMOVD", v, temp)
f.instr("VPBROADCASTB", temp, vec) f.instr("VPBROADCASTB", temp, vec)
} }
} }

View File

@@ -185,7 +185,7 @@ func TestSIMDStringOps(t *testing.T) {
actual = index_c0_asm_256(haystack) actual = index_c0_asm_256(haystack)
} }
if actual != expected { 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("")
c0tests("abcdef") c0tests("abcdef")
c0tests("a\x00")
c0tests("afsgdfg\x7f") c0tests("afsgdfg\x7f")
c0tests("a\nfgdfgd\r") c0tests("a\nfgdfgd\r")
c0tests("afgd\rfgd\t") c0tests("afgd\rfgd\t")
c0tests("a\x00")
} }
func TestIntrinsics(t *testing.T) { func TestIntrinsics(t *testing.T) {