mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Prepare to add cpu_arch_utility types
This commit is contained in:
1 parent
869be76fae
commit
492068f3dc
8 files changed
+77
-29
No files matched your search
+4
-4
@@ -49,14 +49,14 @@ func calcCPUArchBits(n *a.Func) (ret cpuArchBits) {
|
||||
}
|
||||
|
||||
func (q *checker) tcheckCPUArchBits(cab cpuArchBits, typ *a.TypeExpr) error {
|
||||
if qid := typ.Innermost().QID(); qid[0] == t.IDBase {
|
||||
if qid := typ.Innermost().QID(); (qid[0] == t.IDBase) && qid[1].IsBuiltInCPUArch() {
|
||||
need := cpuArchBits(0)
|
||||
switch qid[1] {
|
||||
case t.IDARMCRC32U32:
|
||||
case t.IDARMCRC32Utility, t.IDARMCRC32U32:
|
||||
need = cpuArchBitsARMCRC32
|
||||
case t.IDARMNeon64, t.IDARMNeon128:
|
||||
case t.IDARMNeonUtility, t.IDARMNeon64, t.IDARMNeon128:
|
||||
need = cpuArchBitsARMNeon
|
||||
case t.IDX86M128I:
|
||||
case t.IDX86SSE42Utility, t.IDX86M128I:
|
||||
need = cpuArchBitsX86SSE42
|
||||
}
|
||||
if (cab & need) != need {
|
||||
|
||||
Reference in new issue
Block a user