diff --git a/examples/C/lab1matrix/Makefile b/examples/C/lab1matrix/Makefile deleted file mode 100644 index 18c011f4..00000000 --- a/examples/C/lab1matrix/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -TARGET = matMult - -$(TARGET).objdump: $(TARGET) - riscv64-unknown-elf-objdump -S -D $(TARGET) > $(TARGET).objdump - spike $(TARGET) - -$(TARGET): $(TARGET).c Makefile - riscv64-unknown-elf-gcc -o $(TARGET) -g -O\ - -march=rv64gc -mabi=lp64d -mcmodel=medany \ - -nostdlib -static -lm -fno-tree-loop-distribute-patterns \ - -T../common/test.ld -I../common \ - $(TARGET).c ../common/crt.S ../common/syscalls.c -# Compiler flags: -# -o $(TARGET) defines the name of the output file -# -g generates debugging symbols for gdb -# -O turns on basic optimization; -O3 turns on heavy optimization; omit for no optimization -# -march=rv64gc -mabi=lp64d =mcmodel=medany generates code for RV64GC with doubles and long/ptrs = 64 bits -# -static forces static linking (no dynamic shared libraries on bare metal) -# -lm links the math library if necessary (when #include math.h) -# -nostdlib avoids inserting standard startup files and default libraries -# because we are using crt.s on bare metal -# -fno-tree-loop-distribute-patterns turns replacing loops with memcpy/memset in the std library -# -T specifies the linker file -# -I specifies the include path (e.g. for util.h) -# The last line defines the C files to compile. -# crt.S is needed as our startup file to initialize the processor -# syscalls.c implements printf through the HTIF for Spike -# other flags from riscv-tests makefiles that don't seem to be important -# -ffast-math -DPREALLOCATE=1 -std=gnu99 \ -# -fno-common -fno-builtin-printf -nostartfiles -lgcc \ - -clean: - rm -f $(TARGET) $(TARGET).objdump diff --git a/examples/C/lab1matrix/matMult b/examples/C/lab1matrix/matMult deleted file mode 100755 index e3d3b25d..00000000 Binary files a/examples/C/lab1matrix/matMult and /dev/null differ diff --git a/examples/C/lab1matrix/matMult.c b/examples/C/lab1matrix/matMult.c deleted file mode 100644 index b794819f..00000000 --- a/examples/C/lab1matrix/matMult.c +++ /dev/null @@ -1,87 +0,0 @@ -// matMult.c -// mmasserfrye@hmc.edu 30 January 2022 - -#include // supports printf -#include // supports fabs -#include "util.h" // supports verify - -// puts the indicated row of length n from matrix mat into array arr -void getRow(int n, int row, double *mat, double *arr){ - int ind; - for (int i=0; i