.cfi_startproc simple may do even less than .cfi_startproc, so don't rely on
it. Instead, use regular .cfi_startporc and always set up the expected entry
state.
Change-Id: I6d3e8b8e4a07621bc99c062359a109eb76f85184
/* Cache alignment for function entry */
.balign 16
\name:
- .cfi_startproc simple
+ .cfi_startproc
+ /* Ensure we get a sane starting CFA. */
+ .cfi_def_cfa sp,0
.fnstart
.endm
.global \name
.balign 16
\name:
- .cfi_startproc simple
+ .cfi_startproc
+ /* Ensure we get a sane starting CFA. */
+ .cfi_def_cfa $sp,0
.endm
.macro END name
ALIGN_FUNCTION_ENTRY
VAR(c_name, 0):
CFI_STARTPROC
- // TODO: we reset the CFA state here. It'd be better to use ".cfi_startproc simple" above but
- // clang 3.4 doesn't support this.
+ // Ensure we get a sane starting CFA.
CFI_DEF_CFA(esp, 4)
END_MACRO
ALIGN_FUNCTION_ENTRY
VAR(c_name, 0):
CFI_STARTPROC
- // TODO: we reset the CFA state here. It'd be better to use ".cfi_startproc simple" above but
- // clang 3.4 doesn't support this.
+ // Ensure we get a sane starting CFA.
CFI_DEF_CFA(rsp, 8)
END_MACRO