riscv-sandbox/cyclecount/getcycles.S

11 lines
140 B
ArmAsm
Raw Normal View History

2018-12-08 20:19:54 +00:00
.text
.globl getcycles
.align 2
getcycles:
csrr a1, mcycleh
csrr a0, mcycle
csrr a2, mcycleh
bne a1, a2, getcycles
ret