[PATCH] D74225: [AIX] Implement formal arguments passed in stack memory
Zarko Todorovski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 10:49:46 PST 2020
ZarkoCA planned changes to this revision.
ZarkoCA marked an inline comment as done.
ZarkoCA added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6982
+ if (!VA.isRegLoc() && !VA.isMemLoc())
+ report_fatal_error("Unexpected location for function call argument.");
+
----------------
cebowleratibm wrote:
> I think this should be an assertion. CC_AIX should never push a loc which is neither reg nor mem. You could switch this up a bit:
>
> if (VA.isRegLoc()) { ...}
> assume(VA.isMemLoc)
> // no need for "if (VA.isMemLoc())"
I can change that to an assert. I was only following the precedent in LowerCall_AIX which uses 'report_fatal_error'.
I can check the code to:
```
assert((VA.isRegLoc() || VA.isMemLoc())
if (VA.isRegloc()){
register code
...
}else {
assert(VA.isMemLoc())
memory code
...
}
```
Does that work?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74225/new/
https://reviews.llvm.org/D74225
More information about the llvm-commits
mailing list