mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
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:
@@ -582,7 +582,7 @@ public:
|
||||
/// getVAArg - VAArg produces a result and token chain, and takes a pointer
|
||||
/// and a source value as input.
|
||||
SDValue getVAArg(EVT VT, DebugLoc dl, SDValue Chain, SDValue Ptr,
|
||||
SDValue SV, unsigned Align = 0);
|
||||
SDValue SV, unsigned Align);
|
||||
|
||||
/// getAtomic - Gets a node for an atomic op, produces result and chain and
|
||||
/// takes 3 operands
|
||||
|
||||
@@ -686,6 +686,12 @@ public:
|
||||
return JumpBufAlignment;
|
||||
}
|
||||
|
||||
/// getMinStackArgumentAlignment - return the minimum stack alignment of an
|
||||
/// argument.
|
||||
unsigned getMinStackArgumentAlignment() const {
|
||||
return MinStackArgumentAlignment;
|
||||
}
|
||||
|
||||
/// getPrefLoopAlignment - return the preferred loop alignment.
|
||||
///
|
||||
unsigned getPrefLoopAlignment() const {
|
||||
@@ -1082,6 +1088,12 @@ protected:
|
||||
PrefLoopAlignment = Align;
|
||||
}
|
||||
|
||||
/// setMinStackArgumentAlignment - Set the minimum stack alignment of an
|
||||
/// argument.
|
||||
void setMinStackArgumentAlignment(unsigned Align) {
|
||||
MinStackArgumentAlignment = Align;
|
||||
}
|
||||
|
||||
/// setShouldFoldAtomicFences - Set if the target's implementation of the
|
||||
/// atomic operation intrinsics includes locking. Default is false.
|
||||
void setShouldFoldAtomicFences(bool fold) {
|
||||
@@ -1515,6 +1527,11 @@ private:
|
||||
/// buffers
|
||||
unsigned JumpBufAlignment;
|
||||
|
||||
/// MinStackArgumentAlignment - The minimum alginment that any argument
|
||||
/// on the stack needs to have.
|
||||
///
|
||||
unsigned MinStackArgumentAlignment;
|
||||
|
||||
/// PrefLoopAlignment - The perferred loop alignment.
|
||||
///
|
||||
unsigned PrefLoopAlignment;
|
||||
|
||||
Reference in New Issue
Block a user