forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhrt-nrf54lm20b.s
More file actions
80 lines (80 loc) · 1.51 KB
/
Copy pathhrt-nrf54lm20b.s
File metadata and controls
80 lines (80 loc) · 1.51 KB
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
.file "hrt.c"
.option nopic
.attribute arch, "rv32e2p0_m2p0_c2p0_zicsr2p0"
.attribute unaligned_access, 0
.attribute stack_align, 4
.text
.section .text.hrt_set_bits,"ax",@progbits
.align 1
.globl hrt_set_bits
.type hrt_set_bits, @function
hrt_set_bits:
#APP
csrr a4, 3008
#NO_APP
lui a5,%hi(irq_arg)
lhu a5,%lo(irq_arg)(a5)
or a5,a5,a4
slli a5,a5,16
srli a5,a5,16
#APP
csrw 3008, a5
#NO_APP
ret
.size hrt_set_bits, .-hrt_set_bits
.section .text.hrt_clear_bits,"ax",@progbits
.align 1
.globl hrt_clear_bits
.type hrt_clear_bits, @function
hrt_clear_bits:
#APP
csrr a4, 3008
#NO_APP
lui a5,%hi(irq_arg)
lhu a5,%lo(irq_arg)(a5)
not a5,a5
and a5,a5,a4
slli a5,a5,16
srli a5,a5,16
#APP
csrw 3008, a5
#NO_APP
ret
.size hrt_clear_bits, .-hrt_clear_bits
.section .text.hrt_toggle_bits,"ax",@progbits
.align 1
.globl hrt_toggle_bits
.type hrt_toggle_bits, @function
hrt_toggle_bits:
lui a5,%hi(irq_arg)
lhu a5,%lo(irq_arg)(a5)
#APP
csrw 3024, a5
#NO_APP
ret
.size hrt_toggle_bits, .-hrt_toggle_bits
.section .text.hrt_set_masked_bits,"ax",@progbits
.align 1
.globl hrt_set_masked_bits
.type hrt_set_masked_bits, @function
hrt_set_masked_bits:
#APP
csrr a2, 3008
#NO_APP
lui a3,%hi(irq_arg)
lhu a5,%lo(irq_arg)(a3)
lui a4,%hi(irq_arg2)
lhu a4,%lo(irq_arg2)(a4)
lhu a3,%lo(irq_arg)(a3)
not a5,a5
and a5,a5,a2
and a4,a4,a3
or a5,a5,a4
slli a5,a5,16
srli a5,a5,16
#APP
csrw 3008, a5
#NO_APP
ret
.size hrt_set_masked_bits, .-hrt_set_masked_bits
.section .note.GNU-stack,"",@progbits