aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadesh Ramanathan <nadeshramanathan88@gmail.com>2020-06-13 15:09:27 +0100
committerNadesh Ramanathan <nadeshramanathan88@gmail.com>2020-06-13 15:09:27 +0100
commitb936f4425fdeee3a50fcd3861cb6f53ed88f70de (patch)
tree54c2e912b0b6f6e2d0dd6484a690105eb5cef6d7
parent66e0117b6519f97eeef931a51ad029ee630f81f4 (diff)
downloadvericert-kvx-b936f4425fdeee3a50fcd3861cb6f53ed88f70de.tar.gz
vericert-kvx-b936f4425fdeee3a50fcd3861cb6f53ed88f70de.zip
address masking
-rw-r--r--test/array-addr-mask.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/array-addr-mask.c b/test/array-addr-mask.c
new file mode 100644
index 0000000..5ba5601
--- /dev/null
+++ b/test/array-addr-mask.c
@@ -0,0 +1,6 @@
+int main() {
+ unsigned int x[8] = {1,2,3,4,5,6,7,8};
+ unsigned int index = 6;
+ unsigned int addr = index & 3;
+ return (x[addr]);
+}