Automated objdumping of test programs

This commit is contained in:
François Autin
2023-03-01 13:44:48 +01:00
parent b863315030
commit afe643170f
16 changed files with 39 additions and 48 deletions

View File

@ -0,0 +1,4 @@
TOPDIR = ../..
include $(TOPDIR)/Makefile.dumps
dumps: unsigned_addition.dump unsigned_division.dump unsigned_multiplication.dump unsigned_substraction.dump

View File

@ -0,0 +1,15 @@
# Simple arithmetics program
These allow to check whether the following instructions are correctly implemented.
- addi
- sd
- sw
- li
- sw
- lw
- mv
- addw
- nop
- ld
- ret

View File

@ -0,0 +1,6 @@
// EXPECTS TWO VARIABLES WITH A VALUE OF UNSIGNED 1
void main() {
unsigned int x = 0;
unsigned int y = 1;
x = x + y;
}

View File

@ -0,0 +1,6 @@
// Expecting two variables with a value of two
void main() {
unsigned int x = 4;
unsigned int y = 2;
x = x / y;
}

View File

@ -0,0 +1,6 @@
// EXPECTS TWO VARIABLES WITH A VALUE OF UNSIGNED 2
void main() {
unsigned int x = 1;
unsigned int y = 2;
x = x * y;
}

View File

@ -0,0 +1,6 @@
// EXPECTS TWO VARIABLES WITH A VALUE OF UNSIGNED 1
void main() {
unsigned int x = 1;
unsigned int y = 1;
x = x - y;
}