Mailing List Archive

[PATCH] mpi/i386: fix DWARF CFI for _gcry_mpih_sub_n and _gcry_mpih_add_n
* mpi/i386/mpih-add1.S (_gcry_mpih_add_n) [PIC]: Adjust CFI CFA offset
when making call and restoring stack pointer.
* mpi/i386/mpih-sub1.S (_gcry_mpih_sub_n) [PIC]: Ditto.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
---
mpi/i386/mpih-add1.S | 2 ++
mpi/i386/mpih-sub1.S | 2 ++
2 files changed, 4 insertions(+)

diff --git a/mpi/i386/mpih-add1.S b/mpi/i386/mpih-add1.S
index 2f1ae931c..de78a0cb1 100644
--- a/mpi/i386/mpih-add1.S
+++ b/mpi/i386/mpih-add1.S
@@ -78,10 +78,12 @@ C_SYMBOL_NAME(_gcry_mpih_add_n:)
/* Calculate start address in loop for PIC. Due to limitations in some
assemblers, Loop-L0-3 cannot be put into the leal */
call L0
+ CFI_ADJUST_CFA_OFFSET(4)
L0: leal (%eax,%eax,8),%eax
addl (%esp),%eax
addl $(Loop-L0-3),%eax
addl $4,%esp
+ CFI_ADJUST_CFA_OFFSET(-4)
#else
/* Calculate start address in loop for non-PIC. */
leal (Loop - 3)(%eax,%eax,8),%eax
diff --git a/mpi/i386/mpih-sub1.S b/mpi/i386/mpih-sub1.S
index 01e977e53..2bdc14386 100644
--- a/mpi/i386/mpih-sub1.S
+++ b/mpi/i386/mpih-sub1.S
@@ -79,10 +79,12 @@ C_SYMBOL_NAME(_gcry_mpih_sub_n:)
/* Calculate start address in loop for PIC. Due to limitations in some
assemblers, Loop-L0-3 cannot be put into the leal */
call L0
+ CFI_ADJUST_CFA_OFFSET(4)
L0: leal (%eax,%eax,8),%eax
addl (%esp),%eax
addl $(Loop-L0-3),%eax
addl $4,%esp
+ CFI_ADJUST_CFA_OFFSET(-4)
#else
/* Calculate start address in loop for non-PIC. */
leal (Loop - 3)(%eax,%eax,8),%eax


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel