From e5d2c0c5de0541507c602b1d9a5cff2a0cc88494 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 16 Dec 2023 08:45:32 +0100 Subject: [PATCH] tests: add simple ma.c program for testing misaligned access --- programs/ma.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 programs/ma.c diff --git a/programs/ma.c b/programs/ma.c new file mode 100644 index 0000000..00f09d2 --- /dev/null +++ b/programs/ma.c @@ -0,0 +1,14 @@ +int main() { + + // 0x0F000000 + __asm__(" \ + addi x1, x0, 0x0F\n \ + sll x1, x1, 24\n \ + addi x1, x1, 0x0A\n \ + sw x1, 1(x0)\n \ + lw x2, 1(x0)\n \ + nop\n \ + nop\n \ + ebreak\n \ + "); +} -- 2.48.1