[PATCH] D12346: x32. Fixes a bug in how struct va_list is initialized in x32
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 16:15:54 PDT 2015
dschuff added a subscriber: dschuff.
dschuff added a reviewer: dschuff.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15195
@@ -15194,3 +15194,3 @@
// Store ptr to reg_save_area.
- FIN = DAG.getNode(ISD::ADD, DL, PtrVT, FIN, DAG.getIntPtrConstant(8, DL));
+ FIN = DAG.getNode(ISD::ADD, DL, PtrVT, FIN, DAG.getIntPtrConstant(Subtarget->isTarget64BitLP64() ? 8 : 4, DL));
SDValue RSFIN = DAG.getFrameIndex(FuncInfo->getRegSaveFrameIndex(), PtrVT);
----------------
80 col wrap. maybe just clang-format the patch?
================
Comment at: test/CodeGen/X86/stdarg.ll:13
@@ +12,3 @@
+
+; These test for specific offsets, which is very fragile. Still, the test needs to ensure that
+; va_list is correctly handled by both x86-64 and x32.
----------------
80 col
http://reviews.llvm.org/D12346
More information about the llvm-commits
mailing list