-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prepare wasm support for aarch64 and riscv64
- Loading branch information
Showing
8 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# The code is derived from the musl implementation | ||
# of longjmp. | ||
.section .text | ||
.global longjmp | ||
longjmp: | ||
# IHI0055B_aapcs64.pdf 5.1.1, 5.1.2 callee saved registers | ||
ldp x19, x20, [x0,#0] | ||
ldp x21, x22, [x0,#16] | ||
ldp x23, x24, [x0,#32] | ||
ldp x25, x26, [x0,#48] | ||
ldp x27, x28, [x0,#64] | ||
ldp x29, x30, [x0,#80] | ||
ldr x2, [x0,#104] | ||
mov sp, x2 | ||
|
||
cmp w1, 0 | ||
csinc w0, w1, wzr, ne | ||
br x30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# The code is derived from the musl implementation | ||
# of setjmp. | ||
.section .text | ||
.global setjmp | ||
setjmp: | ||
# IHI0055B_aapcs64.pdf 5.1.1, 5.1.2 callee saved registers | ||
stp x19, x20, [x0,#0] | ||
stp x21, x22, [x0,#16] | ||
stp x23, x24, [x0,#32] | ||
stp x25, x26, [x0,#48] | ||
stp x27, x28, [x0,#64] | ||
stp x29, x30, [x0,#80] | ||
mov x2, sp | ||
str x2, [x0,#104] | ||
mov x0, #0 | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# The code is derived from the musl implementation | ||
# of longjmp. | ||
.section .text | ||
.global longjmp | ||
longjmp: | ||
ld s0, 0(a0) | ||
ld s1, 8(a0) | ||
ld s2, 16(a0) | ||
ld s3, 24(a0) | ||
ld s4, 32(a0) | ||
ld s5, 40(a0) | ||
ld s6, 48(a0) | ||
ld s7, 56(a0) | ||
ld s8, 64(a0) | ||
ld s9, 72(a0) | ||
ld s10, 80(a0) | ||
ld s11, 88(a0) | ||
ld sp, 96(a0) | ||
ld ra, 104(a0) | ||
|
||
seqz a0, a1 | ||
add a0, a0, a1 | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# The code is derived from the musl implementation | ||
# of setjmp. | ||
.section .text | ||
.global setjmp | ||
setjmp: | ||
sd s0, 0(a0) | ||
sd s1, 8(a0) | ||
sd s2, 16(a0) | ||
sd s3, 24(a0) | ||
sd s4, 32(a0) | ||
sd s5, 40(a0) | ||
sd s6, 48(a0) | ||
sd s7, 56(a0) | ||
sd s8, 64(a0) | ||
sd s9, 72(a0) | ||
sd s10, 80(a0) | ||
sd s11, 88(a0) | ||
sd sp, 96(a0) | ||
sd ra, 104(a0) | ||
|
||
li a0, 0 | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters