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

+2 -2
View File
@@ -75,7 +75,7 @@ var (
typeExprDecodeFrameOptions = a.NewTypeExpr(0, t.IDBase, t.IDDecodeFrameOptions, nil, nil, nil)
typeExprSSE128I = a.NewTypeExpr(0, t.IDBase, t.IDSSE128I, nil, nil, nil)
typeExprX86M128I = a.NewTypeExpr(0, t.IDBase, t.IDX86M128I, nil, nil, nil)
typeExprSliceU8 = a.NewTypeExpr(t.IDSlice, 0, 0, nil, nil, typeExprU8)
typeExprTableU8 = a.NewTypeExpr(t.IDTable, 0, 0, nil, nil, typeExprU8)
@@ -125,7 +125,7 @@ var builtInTypeMap = typeMap{
t.IDDecodeFrameOptions: typeExprDecodeFrameOptions,
t.IDSSE128I: typeExprSSE128I,
t.IDX86M128I: typeExprX86M128I,
}
func (c *Checker) parseBuiltInFuncs(m map[t.QQID]*a.Func, ss []string) error {
+5 -5
View File
@@ -25,7 +25,7 @@ import (
type cpuArchBits uint32
const (
cpuArchBitsSSE128 = cpuArchBits(0x00000001)
cpuArchBitsX86SSE42 = cpuArchBits(0x00000001)
)
func calcCPUArchBits(n *a.Func) (ret cpuArchBits) {
@@ -35,8 +35,8 @@ func calcCPUArchBits(n *a.Func) (ret cpuArchBits) {
continue
}
switch o.Condition().RHS().AsExpr().Ident() {
case t.IDSSE128:
ret |= cpuArchBitsSSE128
case t.IDX86SSE42:
ret |= cpuArchBitsX86SSE42
}
}
return ret
@@ -46,8 +46,8 @@ func (q *checker) tcheckCPUArchBits(cab cpuArchBits, typ *a.TypeExpr) error {
if qid := typ.Innermost().QID(); qid[0] == t.IDBase {
need := cpuArchBits(0)
switch qid[1] {
case t.IDSSE128I:
need = cpuArchBitsSSE128
case t.IDX86M128I:
need = cpuArchBitsX86SSE42
}
if (cab & need) != need {
return fmt.Errorf("check: missing cpu_arch for %q", typ.Innermost().Str(q.tm))