Fix assembly errors: .../libphobos/src/std/math.d: Assembler messages:.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr s2'make[8]: *** [Makefile:1119: std/math.lo] Error 1 triggered with the RISC-V lp64 multilib in a GCC build configured with `--enable-multilib --enable-languages=all --target=riscv64-linux-gnu'. This is due to unconditional explicit use of F extension instructions within inline assembly, to access IEEE exception flags. The use of these instructions is not allowed when building for a soft-float ABI. Correct the problem by wrapping said inline assembly into a conditional such that if `D_SoftFloat' is true, then reads from IEEE exception flags return 0 and writes are ignored instead, complementing r270522 ("libphobos: Add D support for RISC-V Linux"), which is an updated version of <https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00325.html>, where the problematic code has originated from. libphobos/ChangeLog: 2019-05-02 Maciej W. Rozycki <macro@wdc.com> * std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float ABI. (IeeeFlags.resetIeeeFlags): Likewise. (FloatingPointControl.getControlState): Likewise. (FloatingPointControl.setControlState): Likewise. From-SVN: r270815
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
algorithm | Loading commit data... | |
container | Loading commit data... | |
datetime | Loading commit data... | |
digest | Loading commit data... | |
experimental | Loading commit data... | |
internal | Loading commit data... | |
net | Loading commit data... | |
range | Loading commit data... | |
regex | Loading commit data... | |
windows | Loading commit data... | |
array.d | Loading commit data... | |
ascii.d | Loading commit data... | |
base64.d | Loading commit data... | |
bigint.d | Loading commit data... | |
bitmanip.d | Loading commit data... | |
compiler.d | Loading commit data... | |
complex.d | Loading commit data... | |
concurrency.d | Loading commit data... | |
conv.d | Loading commit data... | |
csv.d | Loading commit data... | |
demangle.d | Loading commit data... | |
encoding.d | Loading commit data... | |
exception.d | Loading commit data... | |
file.d | Loading commit data... | |
format.d | Loading commit data... | |
functional.d | Loading commit data... | |
getopt.d | Loading commit data... | |
json.d | Loading commit data... | |
math.d | Loading commit data... | |
mathspecial.d | Loading commit data... | |
meta.d | Loading commit data... | |
mmfile.d | Loading commit data... | |
numeric.d | Loading commit data... | |
outbuffer.d | Loading commit data... | |
parallelism.d | Loading commit data... | |
path.d | Loading commit data... | |
process.d | Loading commit data... | |
random.d | Loading commit data... | |
signals.d | Loading commit data... | |
socket.d | Loading commit data... | |
stdint.d | Loading commit data... | |
stdio.d | Loading commit data... | |
string.d | Loading commit data... | |
system.d | Loading commit data... | |
traits.d | Loading commit data... | |
typecons.d | Loading commit data... | |
typetuple.d | Loading commit data... | |
uni.d | Loading commit data... | |
uri.d | Loading commit data... | |
utf.d | Loading commit data... | |
uuid.d | Loading commit data... | |
variant.d | Loading commit data... | |
xml.d | Loading commit data... | |
zip.d | Loading commit data... | |
zlib.d | Loading commit data... |