From be34c8d24bb99f941977f6b2e728033a7fe636cd Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 17 Oct 2025 10:27:19 -0400 Subject: Call SetIgnore on all intrinsic types in x86 --- arch/x86/arch_x86_intrinsics.cpp | 77 +++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 29 deletions(-) (limited to 'arch/x86/arch_x86_intrinsics.cpp') diff --git a/arch/x86/arch_x86_intrinsics.cpp b/arch/x86/arch_x86_intrinsics.cpp index bc4efaff..23c7ac53 100644 --- a/arch/x86/arch_x86_intrinsics.cpp +++ b/arch/x86/arch_x86_intrinsics.cpp @@ -5124,6 +5124,14 @@ vector X86CommonArchitecture::GetAllIntrinsics() vector X86CommonArchitecture::GetIntrinsicInputs(uint32_t intrinsic) { + static const vector singleFloat10 { NameAndType(Type::FloatType(10)->SetIgnored(true)) }; + static const vector singleInt10 { NameAndType(Type::IntegerType(10, false)->SetIgnored(true)) }; + static const vector namedDoubleFloat10 { NameAndType("x", Type::FloatType(10)->SetIgnored(true)), NameAndType("y", Type::FloatType(10)->SetIgnored(true)) }; + static const vector doubleFloat10 { NameAndType(Type::FloatType(10)->SetIgnored(true)), NameAndType(Type::FloatType(10)->SetIgnored(true)) }; + static const vector singleInt8 { NameAndType(Type::IntegerType(8, false)->SetIgnored(true)) }; + static const vector singleInt4 { NameAndType(Type::IntegerType(4, false)->SetIgnored(true)) }; + static const vector singleInt2 { NameAndType(Type::IntegerType(2, false)->SetIgnored(true)) }; + switch (intrinsic) { case INTRINSIC_F2XM1: @@ -5134,37 +5142,37 @@ vector X86CommonArchitecture::GetIntrinsicInputs(uint32_t intrinsic case INTRINSIC_FPTAN: case INTRINSIC_FXAM: case INTRINSIC_FXTRACT: - return vector { NameAndType(Type::FloatType(10)) }; + return singleFloat10; case INTRINSIC_FBLD: - return vector { NameAndType(Type::IntegerType(10, false)) }; + return singleInt10; case INTRINSIC_FPATAN: case INTRINSIC_FYL2X: case INTRINSIC_FYL2XP1: - return vector { NameAndType("x", Type::FloatType(10)), NameAndType("y", Type::FloatType(10)) }; + return namedDoubleFloat10; case INTRINSIC_FPREM: case INTRINSIC_FPREM1: case INTRINSIC_FSCALE: - return vector { NameAndType(Type::FloatType(10)), NameAndType(Type::FloatType(10)) }; + return doubleFloat10; case INTRINSIC_XED_IFORM_TZCNT_GPR64_GPRMEM64: - return vector { NameAndType(Type::IntegerType(8, false)) }; + return singleInt8; case INTRINSIC_XED_IFORM_TZCNT_GPR32_GPRMEM32: - return vector { NameAndType(Type::IntegerType(4, false)) }; + return singleInt4; case INTRINSIC_XED_IFORM_TZCNT_GPR16_GPRMEM16: - return vector { NameAndType(Type::IntegerType(2, false)) }; + return singleInt2; case INTRINSIC_XED_IFORM_LZCNT_GPR64_GPRMEM64: - return vector { NameAndType(Type::IntegerType(8, false)) }; + return singleInt8; case INTRINSIC_XED_IFORM_LZCNT_GPR32_GPRMEM32: - return vector { NameAndType(Type::IntegerType(4, false)) }; + return singleInt4; case INTRINSIC_XED_IFORM_LZCNT_GPR16_GPRMEM16: - return vector { NameAndType(Type::IntegerType(2, false)) }; + return singleInt2; case INTRINSIC_XED_IFORM_POPCNT_GPR64_GPRMEM64: - return vector { NameAndType(Type::IntegerType(8, false)) }; + return singleInt8; case INTRINSIC_XED_IFORM_POPCNT_GPR32_GPRMEM32: - return vector { NameAndType(Type::IntegerType(4, false)) }; + return singleInt4; case INTRINSIC_XED_IFORM_POPCNT_GPR16_GPRMEM16: - return vector { NameAndType(Type::IntegerType(2, false)) }; + return singleInt2; #include "x86_intrinsic_input_type.include" @@ -5175,6 +5183,17 @@ vector X86CommonArchitecture::GetIntrinsicInputs(uint32_t intrinsic vector>> X86CommonArchitecture::GetIntrinsicOutputs(uint32_t intrinsic) { + static const vector>> singleFloat10 { Type::FloatType(10)->SetIgnored(true) }; + static const vector>> singleInt10 { Type::IntegerType(10, false)->SetIgnored(true) }; + static const vector>> float10Bool { Type::FloatType(10)->SetIgnored(true), Type::BoolType()->SetIgnored(true) }; + static const vector>> doubleFloat10Bool { Type::FloatType(10)->SetIgnored(true), Type::FloatType(10)->SetIgnored(true), Type::BoolType()->SetIgnored(true) }; + static const vector>> float10BoolInt1 { Type::FloatType(10)->SetIgnored(true), Type::BoolType()->SetIgnored(true), Type::IntegerType(1, false)->SetIgnored(true) }; + static const vector>> quadBool { Type::BoolType()->SetIgnored(true), Type::BoolType()->SetIgnored(true), Type::BoolType()->SetIgnored(true), Type::BoolType()->SetIgnored(true) }; + static const vector>> doubleFloat10 { Type::FloatType(10)->SetIgnored(true), Type::FloatType(10)->SetIgnored(true) }; + static const vector>> singleInt8 { Type::IntegerType(8, false)->SetIgnored(true) }; + static const vector>> singleInt4 { Type::IntegerType(4, false)->SetIgnored(true) }; + static const vector>> singleInt2 { Type::IntegerType(2, false)->SetIgnored(true) }; + switch (intrinsic) { case INTRINSIC_F2XM1: @@ -5183,43 +5202,43 @@ vector>> X86CommonArchitecture::GetIntrinsicOutputs(uint32_ case INTRINSIC_FSCALE: case INTRINSIC_FYL2X: case INTRINSIC_FYL2XP1: - return vector>> { Type::FloatType(10) }; + return singleFloat10; case INTRINSIC_FBST: - return vector>> { Type::IntegerType(10, false) }; + return singleInt10; case INTRINSIC_FSIN: case INTRINSIC_FCOS: case INTRINSIC_FPTAN: - return vector>> { Type::FloatType(10), Type::BoolType() }; + return float10Bool; case INTRINSIC_FSINCOS: - return vector>> { Type::FloatType(10), Type::FloatType(10), Type::BoolType() }; + return doubleFloat10Bool; case INTRINSIC_FPREM: case INTRINSIC_FPREM1: - return vector>> { Type::FloatType(10), Type::BoolType(), Type::IntegerType(1, false) }; + return float10BoolInt1; case INTRINSIC_FXAM: - return vector>> { Type::BoolType(), Type::BoolType(), Type::BoolType(), Type::BoolType() }; + return quadBool; case INTRINSIC_FXTRACT: - return vector>> { Type::FloatType(10), Type::FloatType(10) }; + return doubleFloat10; case INTRINSIC_XED_IFORM_TZCNT_GPR64_GPRMEM64: - return vector>> { Type::IntegerType(8, false)}; + return singleInt8; case INTRINSIC_XED_IFORM_TZCNT_GPR32_GPRMEM32: - return vector>> { Type::IntegerType(4, false)}; + return singleInt4; case INTRINSIC_XED_IFORM_TZCNT_GPR16_GPRMEM16: - return vector>> { Type::IntegerType(2, false)}; + return singleInt2; case INTRINSIC_XED_IFORM_LZCNT_GPR64_GPRMEM64: - return vector>> { Type::IntegerType(8, false)}; + return singleInt8; case INTRINSIC_XED_IFORM_LZCNT_GPR32_GPRMEM32: - return vector>> { Type::IntegerType(4, false)}; + return singleInt4; case INTRINSIC_XED_IFORM_LZCNT_GPR16_GPRMEM16: - return vector>> { Type::IntegerType(2, false)}; + return singleInt2; case INTRINSIC_XED_IFORM_POPCNT_GPR64_GPRMEM64: - return vector>> { Type::IntegerType(8, false)}; + return singleInt8; case INTRINSIC_XED_IFORM_POPCNT_GPR32_GPRMEM32: - return vector>> { Type::IntegerType(4, false)}; + return singleInt4; case INTRINSIC_XED_IFORM_POPCNT_GPR16_GPRMEM16: - return vector>> { Type::IntegerType(2, false)}; + return singleInt2; #include "x86_intrinsic_output_type.include" -- cgit v1.3.1