Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-09 Thread Maciej W. Rozycki
On Mon, 6 May 2019, Jim Wilson wrote: > > Hmm, I've been thinking a little bit about this hybrid mode and I have > > one question: how do we pass the IEEE rounding mode setting between `fcsr' > > and softfp where we have `-march=rv32imafc -mabi=ilp32' and > > `-march=rv32imac -mabi=ilp32' object

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-09 Thread Maciej W. Rozycki
Iain, Jakub -- > > > > With all of the above in mind, OK to apply to trunk and to GCC 9? > > > > > > Looks OK to me. > > > > The change is ok for 9.1 if it can be committed to gcc-9-branch today. > > Committed to both trunk and gcc-9-branch. Thank you both for the review, however, Iain, in the

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-06 Thread Jim Wilson
On Fri, May 3, 2019 at 3:11 PM Maciej W. Rozycki wrote: > Hmm, I've been thinking a little bit about this hybrid mode and I have > one question: how do we pass the IEEE rounding mode setting between `fcsr' > and softfp where we have `-march=rv32imafc -mabi=ilp32' and > `-march=rv32imac -mabi=ilp3

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-03 Thread Maciej W. Rozycki
On Fri, 3 May 2019, Maciej W. Rozycki wrote: > > Technically it is an architecture issue not an ABI issue. If you > > compile for -march=rv32imac -mabi=ilp32 then you can't use FP > > instructions. If you compile for -march=rv32imafc -mabi=ilp32 then > > you can use FP instructions, but we don't

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-03 Thread Maciej W. Rozycki
On Thu, 2 May 2019, Jim Wilson wrote: > > within inline assembly, to access IEEE exception flags. The use of > > these instructions is not allowed when building for a soft-float ABI. > > Technically it is an architecture issue not an ABI issue. If you > compile for -march=rv32imac -mabi=ilp32 t

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-02 Thread Iain Buclaw
On Thu, 2 May 2019 at 22:35, Jim Wilson wrote: > > On Wed, May 1, 2019 at 6:14 PM Maciej Rozycki wrote: > > within inline assembly, to access IEEE exception flags. The use of > > these instructions is not allowed when building for a soft-float ABI. > > Technically it is an architecture issue not

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-02 Thread Jim Wilson
On Wed, May 1, 2019 at 6:14 PM Maciej Rozycki wrote: > within inline assembly, to access IEEE exception flags. The use of > these instructions is not allowed when building for a soft-float ABI. Technically it is an architecture issue not an ABI issue. If you compile for -march=rv32imac -mabi=il

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-02 Thread Iain Buclaw
On Thu, 2 May 2019 at 12:36, Jakub Jelinek wrote: > > On Thu, May 02, 2019 at 09:37:36AM +0200, Iain Buclaw wrote: > > > libphobos/ > > > * std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float > > > ABI. > > > (IeeeFlags.resetIeeeFlags): Likewise. > > >

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-02 Thread Jakub Jelinek
On Thu, May 02, 2019 at 09:37:36AM +0200, Iain Buclaw wrote: > > libphobos/ > > * std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float > > ABI. > > (IeeeFlags.resetIeeeFlags): Likewise. > > (FloatingPointControl.getControlState): Likewise. > >

Re: [PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-02 Thread Iain Buclaw
On Thu, 2 May 2019 at 03:14, Maciej Rozycki wrote: > > From: Maciej W. Rozycki > > 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 op

[PATCH] libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

2019-05-01 Thread Maciej Rozycki
From: Maciej W. Rozycki 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: unrecogn