[PATCH] D92398: [AIX][XCOFF] emit traceback table for function in aix

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 12:49:56 PST 2020


hubert.reinterpretcast accepted this revision.
hubert.reinterpretcast added a comment.

LGTM with comments; thanks.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7310-7314
+      else if (VA.getValVT().isFloatingPoint() && !VA.getValVT().isVector()) {
+        FuncInfo->appendParameterType(VA.getValVT().SimpleTy == MVT::f32
+                                          ? PPCFunctionInfo::ShortFloatPoint
+                                          : PPCFunctionInfo::LongFloatPoint);
+      }
----------------
Minor nit: braces no longer needed.


================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp:82
+
+  for (unsigned I = 0; I < FloatingPointParamNum + FixedParamNum - 1; ++I) {
+    if (CopyParamType & XCOFF::TracebackTable::ParmTypeIsFloatingBit) {
----------------
Minor nit: since the wrapping behaviour of `unsigned` is unwanted here, using a signed type assists in expressing the intent.


================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp:96
+  assert(Type != FixedType && "FixedType should already be handled.");
+  if (30 - Bits > 0)
+    ParameterType |= Type << (30 - Bits);
----------------
This seems to be an off-by-one error? It's fine to set the rightmost two bits together.


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