Skip to content

Commit

Permalink
riscv: Fix soft float check
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelforney committed Oct 18, 2018
1 parent 8597ffb commit 3d06ad0
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ fi

if test "$ARCH" = "riscv32" || test "$ARCH" = "riscv64" ; then
trycppif "RISCVEB || _RISCVEB || __RISCVEB || __RISCVEB__" "$t" && SUBARCH=${SUBARCH}eb
trycppif __riscv_soft_float "$t" && SUBARCH=${SUBARCH}-sf
trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf
fi

if test "$ARCH" = "sh" ; then
Expand Down
2 changes: 1 addition & 1 deletion src/fenv/riscv32/fenv-sf.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#ifdef __riscv_soft_float
#ifndef __riscv_flen
#include "../fenv.c"
#endif
2 changes: 1 addition & 1 deletion src/fenv/riscv32/fenv.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __riscv_soft_float
#ifdef __riscv_flen

.global feclearexcept
.type feclearexcept, %function
Expand Down
2 changes: 1 addition & 1 deletion src/fenv/riscv64/fenv-sf.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#ifdef __riscv_soft_float
#ifndef __riscv_flen
#include "../fenv.c"
#endif
2 changes: 1 addition & 1 deletion src/fenv/riscv64/fenv.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __riscv_soft_float
#ifdef __riscv_flen

.global feclearexcept
.type feclearexcept, %function
Expand Down
2 changes: 1 addition & 1 deletion src/setjmp/riscv32/longjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ longjmp:
lw sp, 48(a0)
lw ra, 52(a0)

#ifndef __riscv_soft_float
#ifndef __riscv_float_abi_soft
fld fs0, 56(a0)
fld fs1, 64(a0)
fld fs2, 72(a0)
Expand Down
2 changes: 1 addition & 1 deletion src/setjmp/riscv32/setjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ setjmp:
sw sp, 48(a0)
sw ra, 52(a0)

#ifndef __riscv_soft_float
#ifndef __riscv_float_abi_soft
fsd fs0, 56(a0)
fsd fs1, 64(a0)
fsd fs2, 72(a0)
Expand Down
2 changes: 1 addition & 1 deletion src/setjmp/riscv64/longjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ longjmp:
ld sp, 96(a0)
ld ra, 104(a0)

#ifndef __riscv_soft_float
#ifndef __riscv_float_abi_soft
fld fs0, 112(a0)
fld fs1, 120(a0)
fld fs2, 128(a0)
Expand Down
2 changes: 1 addition & 1 deletion src/setjmp/riscv64/setjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ setjmp:
sd sp, 96(a0)
sd ra, 104(a0)

#ifndef __riscv_soft_float
#ifndef __riscv_float_abi_soft
fsd fs0, 112(a0)
fsd fs1, 120(a0)
fsd fs2, 128(a0)
Expand Down

0 comments on commit 3d06ad0

Please sign in to comment.