Fix va_arg for doubles. With this patch VAARG nodes always contain the

correct alignment information, which simplifies ExpandRes_VAARG a bit.

The patch introduces a new alignment information to TargetLoweringInfo. This is
needed since the two natural candidates cannot be used:

* The 's' in target data: If this is set to the minimal alignment of any
  argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for
  example.
* The getTransientStackAlignment method. It is possible for an architecture to
  have argument less aligned than what we maintain the stack pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108072 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-07-11 04:01:49 +00:00
parent 4f8e771ae8
commit cbeeae23c3
10 changed files with 57 additions and 11 deletions

View File

@ -580,6 +580,7 @@ TargetLowering::TargetLowering(const TargetMachine &tm,
JumpBufSize = 0;
JumpBufAlignment = 0;
PrefLoopAlignment = 0;
MinStackArgumentAlignment = 1;
ShouldFoldAtomicFences = false;
InitLibcallNames(LibcallRoutineNames);