Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark ABI kernel #2094

Merged
merged 8 commits into from
May 8, 2024
66 changes: 33 additions & 33 deletions sys/arm64/arm64/bus_space_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@
#include <machine/asm.h>
ENTRY(generic_bs_r_1)
ldrb w0, [PTR(1), x2]
ret
RETURN
END(generic_bs_r_1)

ENTRY(generic_bs_r_2)
ldrh w0, [PTR(1), x2]
ret
RETURN
END(generic_bs_r_2)

ENTRY(generic_bs_r_4)
ldr w0, [PTR(1), x2]
ret
RETURN
END(generic_bs_r_4)

ENTRY(generic_bs_r_8)
ldr x0, [PTR(1), x2]
ret
RETURN
END(generic_bs_r_8)

ENTRY(generic_bs_rm_1)
Expand All @@ -64,7 +64,7 @@ ENTRY(generic_bs_rm_1)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rm_1)

ENTRY(generic_bs_rm_2)
Expand All @@ -85,7 +85,7 @@ ENTRY(generic_bs_rm_2)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rm_2)

ENTRY(generic_bs_rm_4)
Expand All @@ -106,7 +106,7 @@ ENTRY(generic_bs_rm_4)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rm_4)

ENTRY(generic_bs_rm_8)
Expand All @@ -127,7 +127,7 @@ ENTRY(generic_bs_rm_8)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rm_8)

ENTRY(generic_bs_rr_1)
Expand All @@ -148,7 +148,7 @@ ENTRY(generic_bs_rr_1)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rr_1)

ENTRY(generic_bs_rr_2)
Expand All @@ -169,7 +169,7 @@ ENTRY(generic_bs_rr_2)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rr_2)

ENTRY(generic_bs_rr_4)
Expand All @@ -190,7 +190,7 @@ ENTRY(generic_bs_rr_4)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rr_4)

ENTRY(generic_bs_rr_8)
Expand All @@ -211,28 +211,28 @@ ENTRY(generic_bs_rr_8)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_rr_8)


ENTRY(generic_bs_w_1)
strb w3, [PTR(1), x2]
ret
RETURN
END(generic_bs_w_1)

ENTRY(generic_bs_w_2)
strh w3, [PTR(1), x2]
ret
RETURN
END(generic_bs_w_2)

ENTRY(generic_bs_w_4)
str w3, [PTR(1), x2]
ret
RETURN
END(generic_bs_w_4)

ENTRY(generic_bs_w_8)
str x3, [PTR(1), x2]
ret
RETURN
END(generic_bs_w_8)

ENTRY(generic_bs_wm_1)
Expand All @@ -252,7 +252,7 @@ ENTRY(generic_bs_wm_1)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wm_1)

ENTRY(generic_bs_wm_2)
Expand All @@ -272,7 +272,7 @@ ENTRY(generic_bs_wm_2)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wm_2)

ENTRY(generic_bs_wm_4)
Expand All @@ -292,7 +292,7 @@ ENTRY(generic_bs_wm_4)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wm_4)

ENTRY(generic_bs_wm_8)
Expand All @@ -312,7 +312,7 @@ ENTRY(generic_bs_wm_8)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wm_8)

ENTRY(generic_bs_wr_1)
Expand All @@ -332,7 +332,7 @@ ENTRY(generic_bs_wr_1)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wr_1)

ENTRY(generic_bs_wr_2)
Expand All @@ -352,7 +352,7 @@ ENTRY(generic_bs_wr_2)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wr_2)

ENTRY(generic_bs_wr_4)
Expand All @@ -372,7 +372,7 @@ ENTRY(generic_bs_wr_4)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wr_4)

ENTRY(generic_bs_wr_8)
Expand All @@ -392,12 +392,12 @@ ENTRY(generic_bs_wr_8)
subs x4, x4, #1
b.ne 1b

2: ret
2: RETURN
END(generic_bs_wr_8)

ENTRY(generic_bs_fault)
mov x0, #-1
ret
RETURN
END(generic_bs_fault)

ENTRY(generic_bs_peek_1)
Expand All @@ -407,7 +407,7 @@ generic_bs_peek_1f:
dsb sy
strb w0,[PTR(3)]
mov x0, #0
ret
RETURN
END(generic_bs_peek_1)

.section .rodata
Expand All @@ -422,7 +422,7 @@ generic_bs_peek_2f:
dsb sy
strh w0,[PTR(3)]
mov x0, #0
ret
RETURN
END(generic_bs_peek_2)

ENTRY(generic_bs_peek_4)
Expand All @@ -432,7 +432,7 @@ generic_bs_peek_4f:
dsb sy
str w0,[PTR(3)]
mov x0, #0
ret
RETURN
END(generic_bs_peek_4)

ENTRY(generic_bs_peek_8)
Expand All @@ -442,7 +442,7 @@ generic_bs_peek_8f:
dsb sy
str x0,[PTR(3)]
mov x0, #0
ret
RETURN
END(generic_bs_peek_8)

ENTRY(generic_bs_poke_1)
Expand All @@ -451,7 +451,7 @@ generic_bs_poke_1f:
strb w3, [PTR(1), x2] /* Checked instruction */
dsb sy
mov x0, #0
ret
RETURN
END(generic_bs_poke_1)

ENTRY(generic_bs_poke_2)
Expand All @@ -460,7 +460,7 @@ generic_bs_poke_2f:
strh w3, [PTR(1), x2] /* Checked instruction */
dsb sy
mov x0, #0
ret
RETURN
END(generic_bs_poke_2)

ENTRY(generic_bs_poke_4)
Expand All @@ -469,7 +469,7 @@ generic_bs_poke_4f:
str w3, [PTR(1), x2] /* Checked instruction */
dsb sy
mov x0, #0
ret
RETURN
END(generic_bs_poke_4)

ENTRY(generic_bs_poke_8)
Expand All @@ -478,5 +478,5 @@ generic_bs_poke_8f:
str x3, [PTR(1), x2] /* Checked instruction */
dsb sy
mov x0, #0
ret
RETURN
END(generic_bs_poke_8)
18 changes: 9 additions & 9 deletions sys/arm64/arm64/copyinout.S
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ EENTRY(copyio_fault)
EXIT_USER_ACCESS_CHECK(w0, PTR(1))
copyio_fault_nopcb:
mov x0, #EFAULT
ret
RETURN
EEND(copyio_fault)
END(copyio_c64_fault)

Expand All @@ -80,7 +80,7 @@ ENTRY(copyout)
b copycommon

1: mov x0, xzr /* return 0 */
ret
RETURN

END(copyout)

Expand All @@ -101,7 +101,7 @@ ENTRY(copyin)
b copycommon

1: mov x0, xzr /* return 0 */
ret
RETURN

END(copyin)

Expand Down Expand Up @@ -158,7 +158,7 @@ ENTRY(copyinstr)
4: mov w1, #ENAMETOOLONG /* Load ENAMETOOLONG to return if failed */
cmp w4, #0 /* Check if we saved the NUL-terminator */
csel w0, wzr, w1, eq /* If so return success, else failure */
ret
RETURN
END(copyinstr)

#if !__has_feature(capabilities)
Expand Down Expand Up @@ -258,7 +258,7 @@ ending:
SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */

mov x0, xzr /* return 0 */
ret
RETURN
.size copycommon, . - copycommon
#endif /* !__has_feature(capabilities) */

Expand Down Expand Up @@ -292,7 +292,7 @@ ENTRY(copyincap)
b copycapcommon

1: mov x0, xzr /* return 0 */
ret
RETURN
END(copyincap)

/*
Expand Down Expand Up @@ -324,7 +324,7 @@ ENTRY(copyoutcap)
b copycapcommon

1: mov x0, xzr /* return 0 */
ret
RETURN
END(copyoutcap)

/*
Expand Down Expand Up @@ -397,7 +397,7 @@ copycap_done:
SET_FAULT_HANDLER(xzr, PTR(7)) /* Clear the handler */

mov x0, xzr /* Return 0 */
ret
RETURN
.size copycapcommon, . - copycapcommon

.text
Expand Down Expand Up @@ -439,6 +439,6 @@ copy_done:
SET_FAULT_HANDLER(xzr, PTR(7)) /* Clear the handler */

mov x0, xzr /* Return 0 */
ret
RETURN
.size copycommon, . - copycommon
#endif
Loading
Loading