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
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent 5711e85e70
commit f176d04500
14 changed files with 240 additions and 163 deletions

View File

@@ -6,16 +6,16 @@
data_label:
.word 0x1234678
ENTRY
adr r0, label
adr r4, label
/* objdump tells us that this uses the literal pool,
* it does not get converted to adr, which is the better
* alternative here.
*/
ldr r1, =label
adrl r2, label
ldr r5, =label
adrl r6, label
label:
ASSERT_EQ_REG(r0, r1)
ASSERT_EQ_REG(r0, r2)
ASSERT_EQ_REG(r4, r5)
ASSERT_EQ_REG(r4, r6)
#if 0
/* Error: symbol .data is in a different section.
@@ -28,6 +28,6 @@ label:
* If you have no idea what I'm talking about, read this:
* https://stackoverflow.com/questions/3322911/what-do-linkers-do/33690144#33690144
*/
adr r1, data_label
adr r5, data_label
#endif
EXIT