Skip to content

Commit f8606dc

Browse files
ILyoanbrson
authored andcommitted
---
yaml --- r: 71920 b: refs/heads/dist-snap c: 03116f2 h: refs/heads/master v: v3
1 parent d80959c commit f8606dc

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: a34948a2c5d7cd296abda6970652a9513d67feb7
10+
refs/heads/dist-snap: 03116f251d2d53842971b356fb320f6101d1a3e5
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/rt/arch/arm/morestack.S

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515

1616
// r4 and r5 are scratch registers for __morestack due to llvm
1717
// ARMFrameLowering::adjustForSegmentedStacks() implementation.
18-
.align 2
19-
.type __morestack,%function
18+
.type __morestack,%function
2019
__morestack:
20+
.fnstart
21+
// Save frame pointer and return address
22+
.save {r4, r5}
23+
.save {lr}
24+
.save {r6, fp, lr}
25+
push {r6, fp, lr}
2126

22-
// Save frame pointer and return address
23-
push {fp, lr}
24-
25-
mov fp, sp
27+
.movsp r6
28+
mov r6, sp
29+
.setfp fp, sp, #4
30+
add fp, sp, #4
2631

2732
// Save argument registers of the original function
2833
push {r0, r1, r2, r3, lr}
@@ -47,20 +52,20 @@ __morestack:
4752
mov pc, r4 // Call the original function
4853

4954
// Switch back to rust stack
50-
mov sp, fp
55+
mov sp, r6
5156

5257
// Save return value
53-
push {r0, r1}
58+
mov r4, r0
59+
mov r5, r1
5460

5561
// Remove the new allocated stack
5662
bl upcall_del_stack@plt
5763

5864
// Restore return value
59-
pop {r0, r1}
60-
65+
mov r0, r4
66+
mov r1, r5
67+
6168
// Return
62-
pop {fp, lr}
69+
pop {r6, fp, lr}
6370
mov pc, lr
64-
.endofmorestack:
65-
.size __morestack, .endofmorestack-__morestack
66-
71+
.fnend

0 commit comments

Comments
 (0)