From b211615f1b141935818e0e093b77eb6714b35578 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 21 May 2021 14:39:46 +0100 Subject: [PATCH] add testloop.s --- src/test/basic_pypowersim/.gitignore | 3 +++ src/test/basic_pypowersim/Makefile | 2 +- src/test/basic_pypowersim/testloop.s | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/test/basic_pypowersim/.gitignore create mode 100644 src/test/basic_pypowersim/testloop.s diff --git a/src/test/basic_pypowersim/.gitignore b/src/test/basic_pypowersim/.gitignore new file mode 100644 index 00000000..9cd5496e --- /dev/null +++ b/src/test/basic_pypowersim/.gitignore @@ -0,0 +1,3 @@ +*.bin +*.elf +*.o diff --git a/src/test/basic_pypowersim/Makefile b/src/test/basic_pypowersim/Makefile index f3ddf216..cff37389 100644 --- a/src/test/basic_pypowersim/Makefile +++ b/src/test/basic_pypowersim/Makefile @@ -11,7 +11,7 @@ sim: kernel.bin clean: rm *.o *.elf *.bin -kernel.elf: test.o +kernel.elf: testloop.o $(TOOLCHAIN)-ld $^ -EL -o $@ -T memmap kernel.bin: kernel.elf diff --git a/src/test/basic_pypowersim/testloop.s b/src/test/basic_pypowersim/testloop.s new file mode 100644 index 00000000..b0272953 --- /dev/null +++ b/src/test/basic_pypowersim/testloop.s @@ -0,0 +1,5 @@ +addi 1, 0, 0 +addi 2, 0, 7 +mtspr 9, 2 /* set ctr to 7 */ +addi 1, 1, 5 +bc 16, 0, -0x4 /* bdnz to the addi above */ -- 2.30.2