mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 13:04:36 +03:00
Added a possibility to reset a red zone in FuncFrame
This commit is contained in:
@@ -1120,6 +1120,15 @@ public:
|
||||
inline uint32_t redZoneSize() const noexcept { return _redZoneSize; }
|
||||
//! Returns the size of 'SpillZone'.
|
||||
inline uint32_t spillZoneSize() const noexcept { return _spillZoneSize; }
|
||||
|
||||
//! Resets the size of red zone, which would disable it entirely.
|
||||
//!
|
||||
//! \note Red zone is currently only used by an AMD64 SystemV calling convention, which expects 128
|
||||
//! bytes of stack to be accessible below stack pointer. These bytes are then accessible within the
|
||||
//! function and Compiler can use this space as a spill area. However, sometimes it's better to
|
||||
//! disallow the use of red zone in case that a user wants to use this stack for a custom purpose.
|
||||
inline void resetRedZone() noexcept { _redZoneSize = 0; }
|
||||
|
||||
//! Returns natural stack alignment (guaranteed stack alignment upon entry).
|
||||
inline uint32_t naturalStackAlignment() const noexcept { return _naturalStackAlignment; }
|
||||
//! Returns natural stack alignment (guaranteed stack alignment upon entry).
|
||||
|
||||
@@ -62,7 +62,7 @@ Error RAStackAllocator::calculateStackFrame() noexcept {
|
||||
|
||||
// STEP 1:
|
||||
//
|
||||
// Update usage based on the size of the slot. We boost smaller slots in a way that 32-bit register has higher
|
||||
// Update usage based on the size of the slot. We boost smaller slots in a way that 32-bit register has a higher
|
||||
// priority than a 128-bit register, however, if one 128-bit register is used 4 times more than some other 32-bit
|
||||
// register it will overweight it.
|
||||
for (RAStackSlot* slot : _slots) {
|
||||
|
||||
Reference in New Issue
Block a user