userland: scope every header identifier with lkmc_

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-21 00:00:01 +00:00
parent 6fe9e5bae7
commit 72200dee4e
78 changed files with 369 additions and 377 deletions

View File

@@ -2,7 +2,7 @@
#include "common.h"
ENTRY
LKMC_ENTRY
/* Mnemonic for a PC relative load:
*
@@ -12,13 +12,13 @@ ENTRY
* ....
*/
ldr r0, myvar
ASSERT_EQ(r0, 0x12345678)
LKMC_ASSERT_EQ(r0, 0x12345678)
/* Mnemonic PC relative load with an offset.
* Load myvar2 instead of myvar.
*/
ldr r0, myvar + 4
ASSERT_EQ(r0, 0x9ABCDEF0)
LKMC_ASSERT_EQ(r0, 0x9ABCDEF0)
/* First store the address in r0 using a magic =myvar, which creates
* a new variable containing the address and PC-relative addresses it
@@ -33,17 +33,17 @@ ENTRY
*/
ldr r0, =myvar
ldr r1, [r0]
ASSERT_EQ(r1, 0x12345678)
LKMC_ASSERT_EQ(r1, 0x12345678)
/* More efficiently, use r0 as the address to read, and write to r0 itself. */
ldr r0, =myvar
ldr r0, [r0]
ASSERT_EQ(r0, 0x12345678)
LKMC_ASSERT_EQ(r0, 0x12345678)
/* Same as =myvar but store a constant to a register.
* Can also be done with movw and movt. */
ldr r0, =0x11112222
ASSERT_EQ(r0, 0x11112222)
LKMC_ASSERT_EQ(r0, 0x11112222)
/* We can also use GAS tolower16 and topper16 and movw and movt
* to load the address of myvar into r0 with two immediates.
@@ -56,9 +56,9 @@ ENTRY
movw r0, #:lower16:myvar
movt r0, #:upper16:myvar
ldr r1, [r0]
ASSERT_EQ(r1, 0x12345678)
LKMC_ASSERT_EQ(r1, 0x12345678)
EXIT
LKMC_EXIT
myvar:
.word 0x12345678
myvar2: