Add CFI unwind assembly directives for 64-bit ARM assembly
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 26 Apr 2019 16:29:08 +0000 (19:29 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 26 Apr 2019 16:29:08 +0000 (19:29 +0300)
commit5a2a96a63517838e04f9fc0fb2d932fac5124b8a
treeac8391f55759d1995088eab36aecc8c5d816cd28
parent14c8a593ede42f51f567ed7ba77b53124151aa38
Add CFI unwind assembly directives for 64-bit ARM assembly

* cipher/asm-common-aarch64.h (CFI_STARTPROC, CFI_ENDPROC)
(CFI_REMEMBER_STATE, CFI_RESTORE_STATE, CFI_ADJUST_CFA_OFFSET)
(CFI_REL_OFFSET, CFI_DEF_CFA_REGISTER, CFI_REGISTER, CFI_RESTORE)
(DW_REGNO_SP, DW_SLEB128_7BIT, DW_SLEB128_28BIT, CFI_CFA_ON_STACK)
(CFI_REG_ON_STACK): New.
* cipher/camellia-aarch64.S: Add CFI directives.
* cipher/chacha20-aarch64.S: Add CFI directives.
* cipher/cipher-gcm-armv8-aarch64-ce.S: Add CFI directives.
* cipher/crc-armv8-aarch64-ce.S: Add CFI directives.
* cipher/rijndael-aarch64.S: Add CFI directives.
* cipher/rijndael-armv8-aarch64-ce.S: Add CFI directives.
* cipher/sha1-armv8-aarch64-ce.S: Add CFI directives.
* cipher/sha256-armv8-aarch64-ce.S: Add CFI directives.
* cipher/twofish-aarch64.S: Add CFI directives.
* mpi/aarch64/mpih-add1.S: Add CFI directives.
* mpi/aarch64/mpih-mul1.S: Add CFI directives.
* mpi/aarch64/mpih-mul2.S: Add CFI directives.
* mpi/aarch64/mpih-mul3.S: Add CFI directives.
* mpi/aarch64/mpih-sub1.S: Add CFI directives.
* mpi/asm-common-aarch64.h: Include "../cipher/asm-common-aarch64.h".
(ELF): Remove.
--

This commit adds CFI directives that add DWARF unwinding information for
debugger to backtrace when executing code from 64-bit ARM assembly files.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
16 files changed:
cipher/asm-common-aarch64.h
cipher/camellia-aarch64.S
cipher/chacha20-aarch64.S
cipher/cipher-gcm-armv8-aarch64-ce.S
cipher/crc-armv8-aarch64-ce.S
cipher/rijndael-aarch64.S
cipher/rijndael-armv8-aarch64-ce.S
cipher/sha1-armv8-aarch64-ce.S
cipher/sha256-armv8-aarch64-ce.S
cipher/twofish-aarch64.S
mpi/aarch64/mpih-add1.S
mpi/aarch64/mpih-mul1.S
mpi/aarch64/mpih-mul2.S
mpi/aarch64/mpih-mul3.S
mpi/aarch64/mpih-sub1.S
mpi/asm-common-aarch64.h