X-Git-Url: https://jxself.org/git/?p=b43-tools.git;a=blobdiff_plain;f=assembler%2Ftest.asm;h=cb0d3bdf95a42ab85ac3b4d136667ddd59e5d2e4;hp=599ca8eb1900c62e92b5f592bd39b30953206dcc;hb=c2202e82a4da7ec25c1d5866f617b644bdcbb73e;hpb=f981680e63cf6efb80b270d5ba2d30ffcbbf0ef4 diff --git a/assembler/test.asm b/assembler/test.asm index 599ca8e..cb0d3bd 100644 --- a/assembler/test.asm +++ b/assembler/test.asm @@ -28,9 +28,17 @@ #define ECOND_MAC_ON (0x20 | 4) +%assert ((((1))) == ((((2 - 1) & 0xFF)))) +%assert ((1 == 2) || (1 == (0xFF & 1))) +%assert (1 != (~1)) +%assert ((1 == (2 - 1)) && (2 == 2)) .text + /* Inline assertion inside of a complex immediate. + * The %assert() expression will always return zero. */ + mov (1 + (%assert(1 == ((1 + 2) - 2)))), r0 + label: /* ADD instructions */ add r0,r1,r2 /* add */ @@ -122,6 +130,7 @@ function_a: nap jmp loop- out: + mov r0, r0 ret lr0, lr1 function_b: @@ -130,6 +139,7 @@ function_b: nap jmp loop- out: + mov r0, r0 ret lr0, lr1 @@ -167,6 +177,7 @@ function_b: mov testlabel, r0 /* Can use label as immediate value */ mov r0,r1;mov r2, r3 /* ; does split instructions */ mov [(1+1)],[(2+2),off0] /* Can use complex immediates as memory offsets */ + orx (0 + 1), (1 * 2), 0, 0, r0 /* Allow complex immediates as M or S */ /* The .initvals section generates an "Initial Values" file