|
|
cfe30e |
From 0e6995a96b0f5867c8d85fbd251cfbc295a3fc4d Mon Sep 17 00:00:00 2001
|
|
|
cfe30e |
From: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
cfe30e |
Date: Sun, 28 Jan 2018 16:44:21 +0000
|
|
|
cfe30e |
Subject: [PATCH 10/25] gnu-efi: fix lib/ia64/setjmp.S IA-64 build failure
|
|
|
cfe30e |
|
|
|
cfe30e |
The build failed as:
|
|
|
cfe30e |
lib/ia64/setjmp.S:171: Error: Unknown opcode `ldf.nt1 f26=[r10],8'
|
|
|
cfe30e |
lib/ia64/setjmp.S:178: Error: Operand 1 of `ldf.fill.nt1' should be a floating-point register
|
|
|
cfe30e |
|
|
|
cfe30e |
The change syncs longjmp definition with
|
|
|
cfe30e |
edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/setjmp.s
|
|
|
cfe30e |
pulling in:
|
|
|
cfe30e |
- branch in the end of function
|
|
|
cfe30e |
- registers used wrong instruction for float restore
|
|
|
cfe30e |
|
|
|
cfe30e |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
cfe30e |
---
|
|
|
cfe30e |
lib/ia64/setjmp.S | 61 +++++++++++++++++++++++++++----------------------------
|
|
|
cfe30e |
1 file changed, 30 insertions(+), 31 deletions(-)
|
|
|
cfe30e |
|
|
|
cfe30e |
diff --git a/lib/ia64/setjmp.S b/lib/ia64/setjmp.S
|
|
|
cfe30e |
index c806fbc82b6..bbb29d8b8f5 100644
|
|
|
cfe30e |
--- a/lib/ia64/setjmp.S
|
|
|
cfe30e |
+++ b/lib/ia64/setjmp.S
|
|
|
cfe30e |
@@ -16,11 +16,11 @@ BASIS,
|
|
|
cfe30e |
.globl setjmp
|
|
|
cfe30e |
.type setjmp, @function
|
|
|
cfe30e |
setjmp:
|
|
|
cfe30e |
- alloc loc = ar.pfs, 1, 2, 1, 0
|
|
|
cfe30e |
+ alloc loc0 = ar.pfs, 1, 2, 1, 0
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
mov r14 = ar.unat
|
|
|
cfe30e |
mov r15 = ar.bsp
|
|
|
cfe30e |
- add r10 = 0x10 * 20, in0
|
|
|
cfe30e |
+ add r10 = 0x10*20, in0
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
stf.spill.nta [in0] = f2, 0x10
|
|
|
cfe30e |
st8.spill.nta [r10] = r4, 8
|
|
|
cfe30e |
@@ -98,29 +98,25 @@ setjmp:
|
|
|
cfe30e |
|
|
|
cfe30e |
.globl longjmp
|
|
|
cfe30e |
.type longjmp, @function
|
|
|
cfe30e |
- .regstk
|
|
|
cfe30e |
+ .regstk 2, 0, 0, 0
|
|
|
cfe30e |
longjmp:
|
|
|
cfe30e |
- add r10 = 0x10 * 20 + 8*14, in0
|
|
|
cfe30e |
- movl r2 = ~(((1<<14) - 1) << 16) | 3)
|
|
|
cfe30e |
+ add r10 = 0x10*20 + 8*14, in0
|
|
|
cfe30e |
+ movl r2 = ~((((1<<14) - 1) << 16) | 3)
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ld8.nt1 r14 = [r10], -8*2
|
|
|
cfe30e |
mov r15 = ar.bspstore
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ld8.nt1 r17 = [r10], -8
|
|
|
cfe30e |
mov r16 = ar.rsc
|
|
|
cfe30e |
- cmp.leu p6 = r14, r15
|
|
|
cfe30e |
+ cmp.leu p6 = r14, r15
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ld8.nt1 r18 = [r10], -8
|
|
|
cfe30e |
ld8.nt1 r25 = [r10], -8
|
|
|
cfe30e |
- and r2 = r16, r2
|
|
|
cfe30e |
+ and r2 = r16, r2
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
- ldf.fill.nt1 f2 = [in0], 0x10
|
|
|
cfe30e |
+ ldf.fill.nt1 f2 = [in0], 0x10
|
|
|
cfe30e |
ld8.nt1 r24 = [r10], -8
|
|
|
cfe30e |
- mov b5 = r25
|
|
|
cfe30e |
- ;;
|
|
|
cfe30e |
- mov ar.rsc = r2
|
|
|
cfe30e |
- ld8.nt1 r23 = [r10], -8
|
|
|
cfe30e |
- mov b5 = r25
|
|
|
cfe30e |
+ mov b5 = r25
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
mov ar.rsc = r2
|
|
|
cfe30e |
ld8.nt1 r23 = [r10], -8
|
|
|
cfe30e |
@@ -137,51 +133,51 @@ _skip_flushrs:
|
|
|
cfe30e |
mov r31 = ar.rnat
|
|
|
cfe30e |
loadrs
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
- ldf.fill.nt1 f4 = [in0], 0x10
|
|
|
cfe30e |
+ ldf.fill.nt1 f4 = [in0], 0x10
|
|
|
cfe30e |
ld8.nt1 r22 = [r10], -8
|
|
|
cfe30e |
- dep r2 = -1, r14, 3, 6
|
|
|
cfe30e |
+ dep r2 = -1, r14, 3, 6
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
- ldf.fill.nt1 f5 = [in0], 0x10
|
|
|
cfe30e |
- ld8.nt1 f21 = [r10], -8
|
|
|
cfe30e |
- cmp p6 = r2, r15
|
|
|
cfe30e |
+ ldf.fill.nt1 f5 = [in0], 0x10
|
|
|
cfe30e |
+ ld8.nt1 r21 = [r10], -8
|
|
|
cfe30e |
+ cmp.ltu p6 = r2, r15
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ld8.nt1 r20 = [r10], -0x10
|
|
|
cfe30e |
(p6) ld8.nta r31 = [r2]
|
|
|
cfe30e |
- mov b3 = r23
|
|
|
cfe30e |
+ mov b3 = r23
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f16 = [in0], 0x10
|
|
|
cfe30e |
- ld8.fill.nt1 r7 = [r10], -8
|
|
|
cfe30e |
- mov b2 = r22
|
|
|
cfe30e |
+ ld8.fill.nt1 r7 = [r10], -8
|
|
|
cfe30e |
+ mov b2 = r22
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f17 = [in0], 0x10
|
|
|
cfe30e |
- ld8.fill.nt1 r6 = [r10], -8
|
|
|
cfe30e |
- mov b1 = r21
|
|
|
cfe30e |
+ ld8.fill.nt1 r6 = [r10], -8
|
|
|
cfe30e |
+ mov b1 = r21
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f18 = [in0], 0x10
|
|
|
cfe30e |
- ld8.fill.nt1 r5 = [r10], -8
|
|
|
cfe30e |
- mov b0 = r20
|
|
|
cfe30e |
+ ld8.fill.nt1 r5 = [r10], -8
|
|
|
cfe30e |
+ mov b0 = r20
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f19 = [in0], 0x10
|
|
|
cfe30e |
- ld8.fill.nt1 r4 = [r10], 8*13
|
|
|
cfe30e |
+ ld8.fill.nt1 r4 = [r10], 8*13
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f20 = [in0], 0x10
|
|
|
cfe30e |
ld8.nt1 r19 = [r10], 0x10
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f21 = [in0], 0x10
|
|
|
cfe30e |
- ldf.nt1 f26 = [r10], 8
|
|
|
cfe30e |
+ ld8.nt1 r26 = [r10], 8
|
|
|
cfe30e |
mov ar.pfs = r19
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f22 = [in0], 0x10
|
|
|
cfe30e |
ld8.nt1 r27 = [r10], 8
|
|
|
cfe30e |
- mov pr = r26, -1
|
|
|
cfe30e |
+ mov pr = r26, -1
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
- ldf.fill.nt1 r23 = [in0], 0x10
|
|
|
cfe30e |
+ ldf.fill.nt1 f23 = [in0], 0x10
|
|
|
cfe30e |
ld8.nt1 r28 = [r10], -17*8 - 0x10
|
|
|
cfe30e |
mov ar.lc = r27
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f24 = [in0], 0x10
|
|
|
cfe30e |
ldf.fill.nt1 f25 = [in0], 0x10
|
|
|
cfe30e |
- mov r8 = in1
|
|
|
cfe30e |
+ mov r8 = in1
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
ldf.fill.nt1 f26 = [in0], 0x10
|
|
|
cfe30e |
ldf.fill.nt1 f31 = [r10], -0x10
|
|
|
cfe30e |
@@ -192,9 +188,12 @@ _skip_flushrs:
|
|
|
cfe30e |
ldf.fill.nt1 f28 = [in0]
|
|
|
cfe30e |
ldf.fill.nt1 f29 = [r10], 0x10*3 + 8*4
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
- ld8.fill.nt1 sp = [r10]
|
|
|
cfe30e |
+ ld8.fill.nt1 sp = [r10]
|
|
|
cfe30e |
mov ar.unat = r18
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
mov ar.bspstore = r14
|
|
|
cfe30e |
mov ar.rnat = r31
|
|
|
cfe30e |
;;
|
|
|
cfe30e |
+ invala
|
|
|
cfe30e |
+ mov ar.rsc = r16
|
|
|
cfe30e |
+ br.ret.sptk b0
|
|
|
cfe30e |
--
|
|
|
cfe30e |
2.15.0
|
|
|
cfe30e |
|