Rename sse128/sse128i to x86_sse42/x86_m128i

This commit is contained in:
Nigel Tao committed 2021-01-24 21:58:00 +11:00
1 parent a563bb7cf8
commit 5941e7e5cc
9 files changed
+85 -83

No files matched your search

+1 -1
View File
@@ -141,7 +141,7 @@ func (g *gen) writeBuiltinCall(b *buffer, n *a.Expr, sideEffectsOnly bool, depth
b.writes("&empty_io_buffer")
return nil
}
case t.IDSSE128I:
case t.IDX86M128I:
return g.writeBuiltinCPUArch(b, recv, method.Ident(), n.Args(), sideEffectsOnly, depth)
}
}
+1 -1
View File
@@ -579,7 +579,7 @@ var cTypeNames = [...]string{
t.IDTokenReader: "wuffs_base__token_buffer*",
t.IDTokenWriter: "wuffs_base__token_buffer*",
t.IDSSE128I: "__m128i",
t.IDX86M128I: "__m128i",
}
const noSuchCOperator = " no_such_C_operator "
+4 -4
View File
@@ -258,18 +258,18 @@ func (g *gen) writeStatementChoose(b *buffer, n *a.Choose, depth uint32) error {
}
func cpuArchCNames(asserts []*a.Node) (caMacro string, caName string, caAttribute string) {
sse128 := false
sse42 := false
for _, o := range asserts {
o := o.AsAssert()
if !o.IsChooseCPUArch() {
continue
}
switch o.Condition().RHS().AsExpr().Ident() {
case t.IDSSE128:
sse128 = true
case t.IDX86SSE42:
sse42 = true
}
}
if sse128 {
if sse42 {
return "X86_64", "sse128", "__attribute__((target(\"sse4.2\")))"
}
return "", "", ""