From 3675a813c65178ae2d8a804622dff11d41709f68 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 27 Feb 2022 17:23:33 +0000 Subject: [PATCH] Linking against riscv-isa-sim SoftFloat library for RISC-V NaN behavior --- pipelined/src/fma/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipelined/src/fma/Makefile b/pipelined/src/fma/Makefile index 7ca0b292..4d0efe20 100644 --- a/pipelined/src/fma/Makefile +++ b/pipelined/src/fma/Makefile @@ -4,8 +4,12 @@ CC = gcc CFLAGS = -O3 LIBS = -lm LFLAGS = -L. -IFLAGS = -I../../../addins/SoftFloat-3e/source/include/ -LIBS = ../../../addins/SoftFloat-3e/build/Linux-x86_64-GCC/softfloat.a +# Link against the riscv-isa-sim version of SoftFloat rather than +# the regular version to get RISC-V NaN behavior +IFLAGS = -I$(RISCV)/riscv-isa-sim/softfloat +LIBS = $(RISCV)/riscv-isa-sim/build/libsoftfloat.a +#IFLAGS = -I../../../addins/SoftFloat-3e/source/include/ +#LIBS = ../../../addins/SoftFloat-3e/build/Linux-x86_64-GCC/softfloat.a SRCS = $(wildcard *.c) PROGS = $(patsubst %.c,%,$(SRCS))