Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMPStaticAnalyzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
SMPStaticAnalyzer
Commits
63c3799f
Commit
63c3799f
authored
6 years ago
by
Clark Coleman
Browse files
Options
Downloads
Patches
Plain Diff
Corner case fix to support LAF; BinaryRTL() building cleanup.
parent
8acd3ee3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/base/SMPFunction.cpp
+2
-2
2 additions, 2 deletions
src/base/SMPFunction.cpp
src/base/SMPInstr.cpp
+22
-13
22 additions, 13 deletions
src/base/SMPInstr.cpp
with
24 additions
and
15 deletions
src/base/SMPFunction.cpp
+
2
−
2
View file @
63c3799f
...
...
@@ -4089,10 +4089,10 @@ bool SMPFunction::MDUpdateFGStackLocInfo(STARS_ea_t InstAddr, const STARSOpndTyp
this->PositiveOffsetFineGrainedStackTable[SignedOffset].SizeInfo |= NewFG.SizeInfo;
}
}
else if (this->OutgoingArgsComputed && (((std::size_t) SignedOffset) < this->OutgoingArgsSize)) {
else if (
!this->DoesStackFrameExtendPastStackTop() &&
this->OutgoingArgsComputed && (((std::size_t) SignedOffset) < this->OutgoingArgsSize)) {
// We don't want to update the outgoing args region, as it will not be consistent
// over multiple function calls. NOTE: We could fine tune this by seeing if we
// call mu
t
liple target functions or not; if only one, then outgoing args region
// call mul
t
iple target functions or not; if only one, then outgoing args region
// would be consistent in the absence of varargs targets.
return false;
}
...
...
This diff is collapsed.
Click to expand it.
src/base/SMPInstr.cpp
+
22
−
13
View file @
63c3799f
...
...
@@ -18714,10 +18714,9 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
bool StackPointerModification = false; // SP := SP SMP_BITWISE_AND operand
bool NeedsGuard = ((STARS_NN_arpl == opcode) || (STARS_NN_bound == opcode));
bool BuildOnlySignalRT = (STARS_NN_bound == opcode);
SMPRegTransfer *TempRT = NULL;
SMPRegTransfer *RightRT = new SMPRegTransfer;
SMPGuard *Guard1 = NULL;
RightRT->SetParentInst(this);
SMPRegTransfer *TempRT = nullptr;
SMPRegTransfer *RightRT = nullptr;
SMPGuard *Guard1 = nullptr;
STARSOpndTypePtr VoidOp = this->STARSInstPtr->MakeVoidOpnd();
...
...
@@ -18737,6 +18736,8 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
TempRT->SetParentInst(this);
TempRT->SetLeftOperand(FPRegOp);
TempRT->SetOperator(SMP_ASSIGN);
RightRT = new SMPRegTransfer;
RightRT->SetParentInst(this);
RightRT->SetLeftOperand(FPRegOp);
RightRT->SetOperator(BinaryOp);
RightRT->SetRightOperand(VoidOp);
...
...
@@ -18767,6 +18768,8 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
}
else {
if (!BuildOnlySignalRT) {
RightRT = new SMPRegTransfer;
RightRT->SetParentInst(this);
RightRT->SetLeftOperand(TempOp);
RightRT->SetOperator(BinaryOp);
TempRT->SetRightTree(RightRT);
...
...
@@ -18808,9 +18811,15 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
if (!MemSrc || MemDest || (IsMemOperand(TempOp))) {
SourceFound = true;
if (!BuildOnlySignalRT) {
RightRT->SetRightOperand(TempOp);
if (StackPointerModification && (TempOp->IsImmedOp())) {
this->SetStackAlignmentInst();
if (nullptr != RightRT) {
RightRT->SetRightOperand(TempOp);
if (StackPointerModification && (TempOp->IsImmedOp())) {
this->SetStackAlignmentInst();
}
}
else {
SourceFound = false; // take error exit
break;
}
}
}
...
...
@@ -18835,10 +18844,9 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
} // end for (OpNum = 0; ...)
if (!DestFound || !SourceFound) {
assert(NULL != RightRT);
if (DestFound && (NULL != TempRT))
if (DestFound && (nullptr != TempRT))
delete TempRT;
else
else
if (nullptr != RightRT)
delete RightRT;
#if SMP_DEBUG_BUILD_RTL
if (!DestFound) {
...
...
@@ -18857,7 +18865,8 @@ bool SMPInstr::BuildBinaryRTL(SMPoperator BinaryOp, bool HiddenFPStackOp) {
TempRT->SetLeftOperand(VoidOp);
TempRT->SetRightOperand(VoidOp);
TempRT->SetOperator(SMP_SIGNAL);
delete RightRT;
if (nullptr != RightRT)
delete RightRT;
}
this->RTL.push_back(TempRT);
// The "p" at the end of the opcode indicates that the floating point
...
...
@@ -23447,7 +23456,7 @@ bool SMPInstr::BuildX86RTL(void)
case STARS_NN_fist: // Store Integer
case STARS_NN_fistp: // Store Integer and Pop
return this->Build
Bi
naryRTL(SMP_CONVERT_FP_TO_INT);
return this->Build
U
naryRTL(SMP_CONVERT_FP_TO_INT);
case STARS_NN_fbld: // Load BCD
case STARS_NN_fbstp: // Store BCD and Pop
...
...
@@ -24381,7 +24390,7 @@ bool SMPInstr::BuildX86RTL(void)
break;
case STARS_NN_fisttp: // Store ST in intXX (chop) and pop
return this->Build
Bi
naryRTL(SMP_CONVERT_FP_TO_INT);
return this->Build
U
naryRTL(SMP_CONVERT_FP_TO_INT);
break;
case STARS_NN_lddqu: // Load unaligned integer 128-bit
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment