[PATCH] D92398: [AIX][XCOFF] emit traceback table for function in aix
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 19:42:16 PST 2020
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1838
+
+ if (MRI.isPhysRegUsed(Subtarget->isPPC64() ? PPC::X31 : PPC::R31))
+ FirstHalfOfMandatoryField |= TracebackTable::IsAllocaUsedMask;
----------------
Use `static_assert` to relate the registers being checked against the register we will claim is being associated with `alloca`.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1939
+ uint32_t ParaType = FI->getParameterType();
+ CommentOS << "Parameter type = "
+ << XCOFF::parseParmsType(ParaType,
----------------
Assert here that HasVectorInfo is `false`.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1954-1957
+ if (FirstHalfOfMandatoryField & TracebackTable::IsInterruptHandlerMask)
+ report_fatal_error("Hand_Mask not implement yes");
+
+ // Since we unset the Int_Handler.
----------------
Fix misplaced comment.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1959
+ if (FirstHalfOfMandatoryField & TracebackTable::HasControlledStorageMask)
+ report_fatal_error("Ctl_Info not implement yes");
+
----------------
Fix typo.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1963
+ StringRef Name = MF->getName();
+ uint16_t NameLength = Name.size();
+ CommentOS << "Function name len = "
----------------
I did not check the XL behaviour here, but it seems that the safe thing to do is to truncate the name to `INT16_MAX` characters. Also, using `int16_t` will better match the type of the field.
================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:26
+public:
+ enum ParamType { FixedType = 0, ShortFloatPoint = 2, LongFloatPoint = 3 };
+
----------------
There seems to be no requirement for the enumerators to take on these particular values.
================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:121
+ /// ParamType - Encode type for every parameter
+ /// in the order of parameters passing in.
+ /// '0'b => fixed parameter.
----------------
================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:125
+ /// '11'b => floating point long parameter.
+ unsigned ParameterType = 0;
+
----------------
This corresponds to a field with a specific width.
================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:216
+
+ unsigned getParameterType() const { return ParameterType; }
+ void setParameterType(ParamType Type, unsigned RegNo);
----------------
Same comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92398/new/
https://reviews.llvm.org/D92398
More information about the llvm-commits
mailing list