mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
Reduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a
2GB-aligned stack anyway? 256 bytes is plenty. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f6de7df46
commit
89e124b6be
@ -60,8 +60,8 @@ const Attributes NoImplicitFloat = 1<<23; /// disable implicit floating point
|
|||||||
const Attributes Naked = 1<<24; ///< Naked function
|
const Attributes Naked = 1<<24; ///< Naked function
|
||||||
const Attributes InlineHint = 1<<25; ///< source said inlining was
|
const Attributes InlineHint = 1<<25; ///< source said inlining was
|
||||||
///desirable
|
///desirable
|
||||||
const Attributes StackAlignment = 31<<26; ///< Alignment of stack for
|
const Attributes StackAlignment = 7<<26; ///< Alignment of stack for
|
||||||
///function (5 bits) stored as log2
|
///function (3 bits) stored as log2
|
||||||
///of alignment with +1 bias
|
///of alignment with +1 bias
|
||||||
///0 means unaligned (different from
|
///0 means unaligned (different from
|
||||||
///alignstack(1))
|
///alignstack(1))
|
||||||
@ -118,7 +118,7 @@ inline Attributes constructStackAlignmentFromInt(unsigned i) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
assert(isPowerOf2_32(i) && "Alignment must be a power of two.");
|
assert(isPowerOf2_32(i) && "Alignment must be a power of two.");
|
||||||
assert(i <= 0x40000000 && "Alignment too large.");
|
assert(i <= 0x100 && "Alignment too large.");
|
||||||
return (Log2_32(i)+1) << 26;
|
return (Log2_32(i)+1) << 26;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user