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-Levelhttps://krinkinmu.github.io/2021/01/04/aarch64-exception-levels.htmlmy code:
.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 mov x2, #3 mov x8, #0x40 svc #0 b end el2: mov x0, #1 adr x1, word2 mov x2, #3 mov x8, #0x40 svc #0 b end el1: mov x0, #1 adr x1, word3 mov x2, #3 mov x8, #0x40 svc #0 b end el0: mov x0, #1 adr x1, word4 mov x2, #3 mov x8, #0x40 svc #0 end: mov x8, #93 mov x0, #0 svc #0 .section .data .align 4 word1: .ascii "a\0" .align 4 word2: .ascii "b\0" .align 4 word3: .ascii "c\0" word4: .align 4 .ascii "d\0"
Hi there, thanks for asking a question in the Arm Community. I have moved your question to the Architectures and Processors forum.