mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 13:04:27 +01:00
userland: add assembly support
Move arm assembly cheat here, and start some work on x86 cheat as well.
This commit is contained in:
15
userland/arch/aarch64/ubfx.S
Normal file
15
userland/arch/aarch64/ubfx.S
Normal file
@@ -0,0 +1,15 @@
|
||||
/* https://github.com/cirosantilli/arm-assembly-cheat#ubfx */
|
||||
|
||||
#include "common.h"
|
||||
|
||||
ENTRY
|
||||
ldr x0, =0x1122334455667788
|
||||
|
||||
ldr x1, =0xFFFFFFFFFFFFFFFF
|
||||
ubfx x1, x0, 8, 16
|
||||
ASSERT_EQ(x1, 0x0000000000006677)
|
||||
|
||||
ldr x1, =0xFFFFFFFFFFFFFFFF
|
||||
ubfx x1, x0, 8, 32
|
||||
ASSERT_EQ(x1, 0x0000000044556677)
|
||||
EXIT
|
||||
Reference in New Issue
Block a user