mailing list of musl libc
 help / color / mirror / code / Atom feed
da7172aff985ccdf36f07b6fb9ee092b43696233 blob 1840 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 
	.global _longjmp
	.global longjmp
	.type   _longjmp,@function
	.type   longjmp,@function
_longjmp:
longjmp:
	# 0) move old return address into the link register
	ld   0,  0*8(3)
	mtlr 0
	# 1) restore cr
	ld   0,  1*8(3)
	mtcr 0
	# 2) restore SP
	ld   1,  2*8(3)
	# 3) restore TOC into both r2 and the caller's stack.
	#    Which location is required depends on whether setjmp was called
	#    locally or non-locally, but it's always safe to restore to both.
	ld   2,  3*8(3)
	std  2,   24(1)
	# 4) restore r14-r31
	ld  14,  4*8(3)
	ld  15,  5*8(3)
	ld  16,  6*8(3)
	ld  17,  7*8(3)
	ld  18,  8*8(3)
	ld  19,  9*8(3)
	ld  20, 10*8(3)
	ld  21, 11*8(3)
	ld  22, 12*8(3)
	ld  23, 13*8(3)
	ld  24, 14*8(3)
	ld  25, 15*8(3)
	ld  26, 16*8(3)
	ld  27, 17*8(3)
	ld  28, 18*8(3)
	ld  29, 19*8(3)
	ld  30, 20*8(3)
	ld  31, 21*8(3)
	# 5) restore floating point registers f14-f31
	lfd 14, 22*8(3)
	lfd 15, 23*8(3)
	lfd 16, 24*8(3)
	lfd 17, 25*8(3)
	lfd 18, 26*8(3)
	lfd 19, 27*8(3)
	lfd 20, 28*8(3)
	lfd 21, 29*8(3)
	lfd 22, 30*8(3)
	lfd 23, 31*8(3)
	lfd 24, 32*8(3)
	lfd 25, 33*8(3)
	lfd 26, 34*8(3)
	lfd 27, 35*8(3)
	lfd 28, 36*8(3)
	lfd 29, 37*8(3)
	lfd 30, 38*8(3)
	lfd 31, 39*8(3)

	# 6) restore vector registers v20-v31 if hardware supports AltiVec
	mflr 0
	bl 1f
	.hidden __hwcap
	.long __hwcap-.
1:      mflr 4
	lwz 5, 0(4)
	add 4, 4, 5
	ld 4, 0(4)
	andis. 4, 4, 0x1000
	beq 1f
	addi 3, 3, 40*8
	lvx 20, 0, 3 ; addi 3, 3, 16
	lvx 21, 0, 3 ; addi 3, 3, 16
	lvx 22, 0, 3 ; addi 3, 3, 16
	lvx 23, 0, 3 ; addi 3, 3, 16
	lvx 24, 0, 3 ; addi 3, 3, 16
	lvx 25, 0, 3 ; addi 3, 3, 16
	lvx 26, 0, 3 ; addi 3, 3, 16
	lvx 27, 0, 3 ; addi 3, 3, 16
	lvx 28, 0, 3 ; addi 3, 3, 16
	lvx 29, 0, 3 ; addi 3, 3, 16
	lvx 30, 0, 3 ; addi 3, 3, 16
	lvx 31, 0, 3
1:	mtlr 0

	# 7) return r4 ? r4 : 1
	mr    3,   4
	cmpwi cr7, 4, 0
	bne   cr7, 1f
	li    3,   1
1:
	blr

debug log:

solving da7172af ...
found da7172af in https://inbox.vuxu.org/musl/20211206234358.2174444-1-stijn@linux-ipv6.be/
found 81d45ff6 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 81d45ff60bfd0560dbea9e20307ebdf4da55a7fb	src/setjmp/powerpc64/longjmp.s

applying [1/1] https://inbox.vuxu.org/musl/20211206234358.2174444-1-stijn@linux-ipv6.be/
diff --git a/src/setjmp/powerpc64/longjmp.s b/src/setjmp/powerpc64/longjmp.s
index 81d45ff6..da7172af 100644

Checking patch src/setjmp/powerpc64/longjmp.s...
Applied patch src/setjmp/powerpc64/longjmp.s cleanly.

index at:
100644 da7172aff985ccdf36f07b6fb9ee092b43696233	src/setjmp/powerpc64/longjmp.s

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).