This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CurrentEL value on android armv8-a

Hello Everyone, I'm trying to get CurrentEL register value(Current Exception Level) on android but it doesn't print anything, how can i fix that?

My references:
developer.arm.com/.../CurrentEL--Current-Exception-Level

https://krinkinmu.github.io/2021/01/04/aarch64-exception-levels.html

my code:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.arch armv8-a
.align 4
.text
.global main
main:
mrs x0, CurrentEL
cmp x0, #0b00
lsr x0, x0, 2
beq el0
cmp x0, #0b01
beq el1
cmp x0, #0b10
beq el2
cmp x0, #0b11
beq el3
el3:
mov x0, #1
adr x1, word1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


0