diff options
Diffstat (limited to 'ld/testsuite/ld-scripts/log2.t')
-rw-r--r-- | ld/testsuite/ld-scripts/log2.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/log2.t b/ld/testsuite/ld-scripts/log2.t new file mode 100644 index 0000000..abf73a9 --- /dev/null +++ b/ld/testsuite/ld-scripts/log2.t @@ -0,0 +1,8 @@ +ASSERT(LOG2CEIL(0) == 0, "LOG2CEIL(0) == 0"); +ASSERT(LOG2CEIL(1) == 0, "LOG2CEIL(1) == 0"); +ASSERT(LOG2CEIL(2) == 1, "LOG2CEIL(2) == 1"); +ASSERT(LOG2CEIL(3) == 2, "LOG2CEIL(3) == 2"); +ASSERT(LOG2CEIL(4) == 2, "LOG2CEIL(4) == 2"); +ASSERT(LOG2CEIL(0x0ff) == 8, "LOG2CEIL(0x0ff) == 8"); +ASSERT(LOG2CEIL(0x100) == 8, "LOG2CEIL(0x100) == 8"); +ASSERT(LOG2CEIL(0x1ff) == 9, "LOG2CEIL(0x1ff) == 9"); |