|
|
bdc76f |
Upstream commit 1d880d4a9bf7608c2cd33bbe954ce6995f79121a
|
|
|
bdc76f |
|
|
|
bdc76f |
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
|
|
bdc76f |
Date: Wed, 12 Dec 2018 12:41:52 +0000 (-0200)
|
|
|
bdc76f |
Subject: powerpc: Add missing CFI register information (bug #23614)
|
|
|
bdc76f |
X-Git-Tag: glibc-2.29~210
|
|
|
bdc76f |
X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=1d880d4a9bf7608c2cd33bbe954ce6995f79121a
|
|
|
bdc76f |
|
|
|
bdc76f |
powerpc: Add missing CFI register information (bug #23614)
|
|
|
bdc76f |
|
|
|
bdc76f |
Add CFI information about the offset of registers stored in the stack
|
|
|
bdc76f |
frame.
|
|
|
bdc76f |
|
|
|
bdc76f |
[BZ #23614]
|
|
|
bdc76f |
* sysdeps/powerpc/powerpc64/addmul_1.S (FUNC): Add CFI offset for
|
|
|
bdc76f |
registers saved in the stack frame.
|
|
|
bdc76f |
* sysdeps/powerpc/powerpc64/lshift.S (__mpn_lshift): Likewise.
|
|
|
bdc76f |
* sysdeps/powerpc/powerpc64/mul_1.S (__mpn_mul_1): Likewise.
|
|
|
bdc76f |
|
|
|
bdc76f |
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
|
|
bdc76f |
Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
|
|
|
bdc76f |
---
|
|
|
bdc76f |
|
|
|
bdc76f |
diff --git a/sysdeps/powerpc/powerpc64/addmul_1.S b/sysdeps/powerpc/powerpc64/addmul_1.S
|
|
|
bdc76f |
index 48e3b1b..e450d6a 100644
|
|
|
bdc76f |
--- a/sysdeps/powerpc/powerpc64/addmul_1.S
|
|
|
bdc76f |
+++ b/sysdeps/powerpc/powerpc64/addmul_1.S
|
|
|
bdc76f |
@@ -34,16 +34,27 @@
|
|
|
bdc76f |
#define N r5
|
|
|
bdc76f |
#define VL r6
|
|
|
bdc76f |
|
|
|
bdc76f |
+#define R27SAVE (-40)
|
|
|
bdc76f |
+#define R28SAVE (-32)
|
|
|
bdc76f |
+#define R29SAVE (-24)
|
|
|
bdc76f |
+#define R30SAVE (-16)
|
|
|
bdc76f |
+#define R31SAVE (-8)
|
|
|
bdc76f |
+
|
|
|
bdc76f |
ENTRY_TOCLESS (FUNC, 5)
|
|
|
bdc76f |
- std r31, -8(r1)
|
|
|
bdc76f |
+ std r31, R31SAVE(r1)
|
|
|
bdc76f |
rldicl. r0, N, 0, 62
|
|
|
bdc76f |
- std r30, -16(r1)
|
|
|
bdc76f |
+ std r30, R30SAVE(r1)
|
|
|
bdc76f |
cmpdi VL, r0, 2
|
|
|
bdc76f |
- std r29, -24(r1)
|
|
|
bdc76f |
+ std r29, R29SAVE(r1)
|
|
|
bdc76f |
addi N, N, 3
|
|
|
bdc76f |
- std r28, -32(r1)
|
|
|
bdc76f |
+ std r28, R28SAVE(r1)
|
|
|
bdc76f |
srdi N, N, 2
|
|
|
bdc76f |
- std r27, -40(r1)
|
|
|
bdc76f |
+ std r27, R27SAVE(r1)
|
|
|
bdc76f |
+ cfi_offset(r31, R31SAVE)
|
|
|
bdc76f |
+ cfi_offset(r30, R30SAVE)
|
|
|
bdc76f |
+ cfi_offset(r29, R29SAVE)
|
|
|
bdc76f |
+ cfi_offset(r28, R28SAVE)
|
|
|
bdc76f |
+ cfi_offset(r27, R27SAVE)
|
|
|
bdc76f |
mtctr N
|
|
|
bdc76f |
beq cr0, L(b00)
|
|
|
bdc76f |
blt cr6, L(b01)
|
|
|
bdc76f |
@@ -199,10 +210,10 @@ L(end): mulld r0, r9, VL
|
|
|
bdc76f |
addic r11, r11, 1
|
|
|
bdc76f |
#endif
|
|
|
bdc76f |
addze RP, r8
|
|
|
bdc76f |
- ld r31, -8(r1)
|
|
|
bdc76f |
- ld r30, -16(r1)
|
|
|
bdc76f |
- ld r29, -24(r1)
|
|
|
bdc76f |
- ld r28, -32(r1)
|
|
|
bdc76f |
- ld r27, -40(r1)
|
|
|
bdc76f |
+ ld r31, R31SAVE(r1)
|
|
|
bdc76f |
+ ld r30, R30SAVE(r1)
|
|
|
bdc76f |
+ ld r29, R29SAVE(r1)
|
|
|
bdc76f |
+ ld r28, R28SAVE(r1)
|
|
|
bdc76f |
+ ld r27, R27SAVE(r1)
|
|
|
bdc76f |
blr
|
|
|
bdc76f |
END(FUNC)
|
|
|
bdc76f |
diff --git a/sysdeps/powerpc/powerpc64/lshift.S b/sysdeps/powerpc/powerpc64/lshift.S
|
|
|
bdc76f |
index 8b6396e..855d6f2 100644
|
|
|
bdc76f |
--- a/sysdeps/powerpc/powerpc64/lshift.S
|
|
|
bdc76f |
+++ b/sysdeps/powerpc/powerpc64/lshift.S
|
|
|
bdc76f |
@@ -26,11 +26,15 @@
|
|
|
bdc76f |
#define TNC r0
|
|
|
bdc76f |
#define U0 r30
|
|
|
bdc76f |
#define U1 r31
|
|
|
bdc76f |
+#define U0SAVE (-16)
|
|
|
bdc76f |
+#define U1SAVE (-8)
|
|
|
bdc76f |
#define RETVAL r5
|
|
|
bdc76f |
|
|
|
bdc76f |
ENTRY_TOCLESS (__mpn_lshift, 5)
|
|
|
bdc76f |
- std U1, -8(r1)
|
|
|
bdc76f |
- std U0, -16(r1)
|
|
|
bdc76f |
+ std U1, U1SAVE(r1)
|
|
|
bdc76f |
+ std U0, U0SAVE(r1)
|
|
|
bdc76f |
+ cfi_offset(U1, U1SAVE)
|
|
|
bdc76f |
+ cfi_offset(U0, U0SAVE)
|
|
|
bdc76f |
subfic TNC, CNT, 64
|
|
|
bdc76f |
sldi r7, N, RP
|
|
|
bdc76f |
add UP, UP, r7
|
|
|
bdc76f |
@@ -170,8 +174,8 @@ L(cj3): or r10, r12, r7
|
|
|
bdc76f |
L(cj2): std r10, -32(RP)
|
|
|
bdc76f |
std r8, -40(RP)
|
|
|
bdc76f |
|
|
|
bdc76f |
-L(ret): ld U1, -8(r1)
|
|
|
bdc76f |
- ld U0, -16(r1)
|
|
|
bdc76f |
+L(ret): ld U1, U1SAVE(r1)
|
|
|
bdc76f |
+ ld U0, U0SAVE(r1)
|
|
|
bdc76f |
mr RP, RETVAL
|
|
|
bdc76f |
blr
|
|
|
bdc76f |
END(__mpn_lshift)
|
|
|
bdc76f |
diff --git a/sysdeps/powerpc/powerpc64/mul_1.S b/sysdeps/powerpc/powerpc64/mul_1.S
|
|
|
bdc76f |
index 953ded8..cade365 100644
|
|
|
bdc76f |
--- a/sysdeps/powerpc/powerpc64/mul_1.S
|
|
|
bdc76f |
+++ b/sysdeps/powerpc/powerpc64/mul_1.S
|
|
|
bdc76f |
@@ -24,9 +24,14 @@
|
|
|
bdc76f |
#define N r5
|
|
|
bdc76f |
#define VL r6
|
|
|
bdc76f |
|
|
|
bdc76f |
+#define R26SAVE (-48)
|
|
|
bdc76f |
+#define R27SAVE (-40)
|
|
|
bdc76f |
+
|
|
|
bdc76f |
ENTRY_TOCLESS (__mpn_mul_1, 5)
|
|
|
bdc76f |
- std r27, -40(r1)
|
|
|
bdc76f |
- std r26, -48(r1)
|
|
|
bdc76f |
+ std r27, R27SAVE(r1)
|
|
|
bdc76f |
+ std r26, R26SAVE(r1)
|
|
|
bdc76f |
+ cfi_offset(r27, R27SAVE)
|
|
|
bdc76f |
+ cfi_offset(r26, R26SAVE)
|
|
|
bdc76f |
li r12, 0
|
|
|
bdc76f |
ld r26, 0(UP)
|
|
|
bdc76f |
|
|
|
bdc76f |
@@ -129,7 +134,7 @@ L(end): mulld r0, r26, VL
|
|
|
bdc76f |
std r0, 0(RP)
|
|
|
bdc76f |
std r7, 8(RP)
|
|
|
bdc76f |
L(ret): addze RP, r8
|
|
|
bdc76f |
- ld r27, -40(r1)
|
|
|
bdc76f |
- ld r26, -48(r1)
|
|
|
bdc76f |
+ ld r27, R27SAVE(r1)
|
|
|
bdc76f |
+ ld r26, R26SAVE(r1)
|
|
|
bdc76f |
blr
|
|
|
bdc76f |
END(__mpn_mul_1)
|