From 9800db3c6e4dea0e5fa5a8a4a7cbdd983ae200cd Mon Sep 17 00:00:00 2001 From: clc5q <clc5q@git.zephyr-software.com> Date: Thu, 1 Mar 2018 16:29:27 +0000 Subject: [PATCH] Build RTLs for a few more opcodes we have never seen in a binary. Former-commit-id: 328695e405b3a31272455ca9f5f578748049fbae --- src/base/SMPInstr.cpp | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp index 3bb14320..0fcfcde4 100644 --- a/src/base/SMPInstr.cpp +++ b/src/base/SMPInstr.cpp @@ -22028,8 +22028,11 @@ bool SMPInstr::BuildRTL(void) { case STARS_NN_cmpps: // Packed Single-FP Compare case STARS_NN_cmpss: // Scalar Single-FP Compare + return this->BuildBinaryPlusImmedRTL(SMP_GENERAL_COMPARE, SMP_CREATE_MASK); + break; + case STARS_NN_comiss: // Scalar Ordered Single-FP Compare and Set EFLAGS - return false; + return this->BuildFlagsDestBinaryRTL(SMP_S_COMPARE); break; case STARS_NN_cvtpi2ps: // Packed signed INT32 to Packed Single-FP conversion @@ -22209,7 +22212,7 @@ bool SMPInstr::BuildRTL(void) { break; case STARS_NN_cmpunordps: // Packed Single-FP Compare UNORD - return false; + return this->BuildBinaryRTL(SMP_GENERAL_COMPARE); break; case STARS_NN_cmpneqps: // Packed Single-FP Compare NOT EQ @@ -22225,7 +22228,7 @@ bool SMPInstr::BuildRTL(void) { break; case STARS_NN_cmpordps: // Packed Single-FP Compare ORDERED - return false; + return this->BuildBinaryRTL(SMP_GENERAL_COMPARE); break; case STARS_NN_cmpeqss: // Scalar Single-FP Compare EQ @@ -22241,7 +22244,7 @@ bool SMPInstr::BuildRTL(void) { break; case STARS_NN_cmpunordss: // Scalar Single-FP Compare UNORD - return false; + return this->BuildBinaryRTL(SMP_GENERAL_COMPARE); break; case STARS_NN_cmpneqss: // Scalar Single-FP Compare NOT EQ @@ -22257,7 +22260,7 @@ bool SMPInstr::BuildRTL(void) { break; case STARS_NN_cmpordss: // Scalar Single-FP Compare ORDERED - return false; + return this->BuildBinaryRTL(SMP_GENERAL_COMPARE); break; // AMD K7 instructions @@ -22319,7 +22322,12 @@ bool SMPInstr::BuildRTL(void) { break; case STARS_NN_clflush: // Flush Cache Line - return false; + NopRT = new SMPRegTransfer; + NopRT->SetParentInst(this); + NopRT->SetOperator(SMP_NULL_OPERATOR); + this->RTL.push_back(NopRT); + NopRT = NULL; + return true; break; case STARS_NN_cmppd: // Compare Packed Double-Precision Floating-Point Values @@ -22541,7 +22549,12 @@ bool SMPInstr::BuildRTL(void) { case STARS_NN_monitor: // Set up a linear address range to be monitored by hardware case STARS_NN_mwait: // Wait until write-back store performed within the range specified by the MONITOR instruction - return false; + NopRT = new SMPRegTransfer; + NopRT->SetParentInst(this); + NopRT->SetOperator(SMP_NULL_OPERATOR); + this->RTL.push_back(NopRT); + NopRT = NULL; + return true; break; case STARS_NN_fisttp: // Store ST in intXX (chop) and pop @@ -22633,7 +22646,7 @@ bool SMPInstr::BuildRTL(void) { case STARS_NN_pfrcpv: // Reciprocal Approximation for a Pair of 32-bit Floats case STARS_NN_pfrsqrtv: // Reciprocal Square Root Approximation for a Pair of 32-bit Floats - return false; + return this->BuildUnaryRTL(SMP_UNARY_FLOATING_ARITHMETIC); break; // SSE2 pseudoinstructions @@ -22713,7 +22726,7 @@ bool SMPInstr::BuildRTL(void) { case STARS_NN_dppd: // Dot Product of Packed Double Precision Floating-Point Values case STARS_NN_dpps: // Dot Product of Packed Single Precision Floating-Point Values - return false; + return this->BuildBinaryPlusImmedRTL(SMP_BINARY_FLOATING_ARITHMETIC, SMP_CREATE_MASK); break; case STARS_NN_extractps: // Extract Packed Single Precision Floating-Point Value -- GitLab