Automated objdumping of test programs
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/Makefile.dumps
|
||||
|
||||
dumps: unsigned_addition.dump unsigned_division.dump unsigned_multiplication.dump unsigned_substraction.dump
|
@ -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
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
Reference in New Issue
Block a user