Programming/ARM
arm asm - ubfs, lsl, orr, cbz, cbnz, stxr, ldxr
decdream
2019. 5. 16. 13:48
< ubfs >
ubfs x0, x1, #0, #8
해석 : x1 에서 0 부터 8개의 bit 를 취해서 x0 에 복사
즉, 0~7 까지의 bit 가 x0 에 복사됨
< lsl >
lsl w0, w1, w2
-> w0 = w1<<w2
< orr >
orr w1,w2,w0
-> w1=w2|w0
< cbz, cbnz>
CBZ Rn, label
CBNZ Rn, label
Rn 이 0이면, label 로 jump
CMP Rn, #0 BEQ label |
Rn 이 0이 아니면, label 로 jump
CMP Rn, #0 BNE label |
< stxr, ldxr >
LDXR reg, [addr]
-> load from memory and exclusive monitor set E flag.
STXR w0, reg, [addr]
-> If excluseve monitor is set E flag, memory is updated and w0 returns zero.
If monitor is not set E flag, memory is not updated and w0 is nonzero.