Changeset 128359eb in mainline for kernel/arch/ia64/include/arch/asm.h


Ignore:
Timestamp:
2020-06-12T16:46:32Z (4 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ffccdff0
Parents:
94e75cf
Message:

Replace get_stack_base() with builtin_frame_address(0)

The usage of an intrinsic function to obtain the current stack pointer
should provide the compuler more room for performance optimizations than
the hand-written (and volatile) inline assembly block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/arch/asm.h

    r94e75cf r128359eb  
    160160}
    161161
    162 /** Return base address of current memory stack.
    163  *
    164  * The memory stack is assumed to be STACK_SIZE / 2 long. Note that there is
    165  * also the RSE stack, which takes up the upper half of STACK_SIZE.
    166  * The memory stack must start on page boundary.
    167  */
    168 _NO_TRACE static inline uintptr_t get_stack_base(void)
    169 {
    170         uint64_t value;
    171 
    172         asm volatile (
    173             "mov %[value] = r12"
    174             : [value] "=r" (value)
    175         );
    176 
    177         return (value & (~(STACK_SIZE / 2 - 1)));
    178 }
    179 
    180162/** Return Processor State Register.
    181163 *
Note: See TracChangeset for help on using the changeset viewer.