https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110188

Kito Cheng <kito at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kito at gcc dot gnu.org

--- Comment #5 from Kito Cheng <kito at gcc dot gnu.org> ---
Each stack area will align to 16 byte, that could be optimized in theory, but
will complicate the frame layout implementation.

----sp - 0
a9 / outgoing stack arguments area
----sp - 4
<unused> / outgoing stack arguments area
----sp - 8
<unused> / outgoing stack arguments area
----sp - 12
<unused> / outgoing stack arguments area
----sp - 16
<unused> / GPR save area
----sp - 20
<unused> / GPR save area
----sp - 24
<unused> / GPR save area
----sp - 28
ra       / GPR save area
----sp - 32



Complete layout has document in riscv.cc:

        +-------------------------------+
        |                               |
        |  incoming stack arguments     |
        |                               |
        +-------------------------------+ <-- incoming stack pointer
        |                               |
        |  callee-allocated save area   |
        |  for arguments that are       |
        |  split between registers and  |
        |  the stack                    |
        |                               |
        +-------------------------------+ <-- arg_pointer_rtx
        |                               |
        |  callee-allocated save area   |
        |  for register varargs         |
        |                               |
        +-------------------------------+ <-- hard_frame_pointer_rtx;
        |                               |     stack_pointer_rtx + gp_sp_offset
        |  GPR save area                |       + UNITS_PER_WORD
        |                               |
        +-------------------------------+ <-- stack_pointer_rtx + fp_sp_offset
        |                               |       + UNITS_PER_HWVALUE
        |  FPR save area                |
        |                               |
        +-------------------------------+ <-- frame_pointer_rtx (virtual)
        |                               |
        |  local variables              |
        |                               |
      P +-------------------------------+
        |                               |
        |  outgoing stack arguments     |
        |                               |
        +-------------------------------+ <-- stack_pointer_rtx

Reply via email to