mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
adrp/lo12 combo
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
#include <lkmc.h>
|
||||
|
||||
LKMC_PROLOGUE
|
||||
/* Actual usage pattern. */
|
||||
adrp x19, mylong
|
||||
add x19, x19, :lo12:mylong
|
||||
ldr x20, [x19]
|
||||
LKMC_ASSERT_EQ(x19, =mylong)
|
||||
LKMC_ASSERT_EQ(x20, =0x1122334455667788)
|
||||
|
||||
/* Minimal testcase. */
|
||||
adrp x0, .Llabel
|
||||
adr x1, .Llabel
|
||||
.Llabel:
|
||||
@@ -11,3 +19,6 @@ LKMC_PROLOGUE
|
||||
bic x1, x1, 0xF00
|
||||
LKMC_ASSERT_EQ_REG(x0, x1)
|
||||
LKMC_EPILOGUE
|
||||
.data
|
||||
mylong:
|
||||
.quad 0x1122334455667788
|
||||
|
||||
Reference in New Issue
Block a user