Files
linux-kernel-module-cheat/userland/arch/aarch64/ubfx.S
Ciro Santilli 六四事件 法轮功 f176d04500 userland: start refactor to show failing values on failure!
aarch64 basically done, but missing:

- other archs
- maybe convert main.c into C++ to use templates?
- full review of ASSERT_EQ calling convention issues not seen by tests
  by chance
- documentation
2019-05-05 00:00:00 +00:00

16 lines
324 B
ArmAsm

/* https://github.com/cirosantilli/arm-assembly-cheat#ubfx */
#include "common.h"
ENTRY
ldr x19, =0x1122334455667788
ldr x20, =0xFFFFFFFFFFFFFFFF
ubfx x20, x19, 8, 16
ASSERT_EQ(x20, 0x0000000000006677)
ldr x20, =0xFFFFFFFFFFFFFFFF
ubfx x20, x19, 8, 32
ASSERT_EQ(x20, 0x0000000044556677)
EXIT