On Tue, 18 Oct 2022, Mike Gilbert wrote:
Reference: https://gcc.gnu.org/wiki/x87note
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
On Tue, 18 Oct 2022, Mike Gilbert wrote:
Reference: https://gcc.gnu.org/wiki/x87note
Which says:
... the amount of worst-case error that could possibly happen using
the x87 (with any amount of intermediate rounding) is at worst the
same as true 64 or 32 bit arithmetic, and in practice is almost
always
better.
and:
Note, however, that this greater repeatability comes at the cost of
lost precision (i.e. SSE always gets the same precision because it
always takes the equivalent of the x87's worst case: a forced round
down at each step).
So, it comes with a price, and I wonder if we shouldn't leave that
choice to the user, and go with the upstream GCC default?
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
Also, why add the flag only to CFLAGS_x86 but not to CFLAGS_amd64?
They should have the same single and double precision arithmetic?
Ulrich
On Tue, 18 Oct 2022, David Seifert wrote:
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
-mfpmath=sse is already the default on amd64.
On Tue, 18 Oct 2022, David Seifert wrote:
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
-mfpmath=sse is already the default on amd64.
I see. This change makes sense then.
What about profiles/arch/x86 though? IIUC we'll end up with an
inconsistency between x86 and multilib amd64.
Ulrich
On Tue, 2022-10-18 at 10:14 +0200, Ulrich Mueller wrote:
On Tue, 18 Oct 2022, Mike Gilbert wrote:
Reference: https://gcc.gnu.org/wiki/x87note
Which says:
... the amount of worst-case error that could possibly happen using
the x87 (with any amount of intermediate rounding) is at worst the
same as true 64 or 32 bit arithmetic, and in practice is almost
always
better.
and:
Note, however, that this greater repeatability comes at the cost of
lost precision (i.e. SSE always gets the same precision because it
always takes the equivalent of the x87's worst case: a forced round
down at each step).
So, it comes with a price, and I wonder if we shouldn't leave that
choice to the user, and go with the upstream GCC default?
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
-mfpmath=sse is already the default on amd64.
On Tue, 2022-10-18 at 13:40 +0200, Ulrich Mueller wrote:
On Tue, 18 Oct 2022, David Seifert wrote:
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
-mfpmath=sse is already the default on amd64.
I see. This change makes sense then.
What about profiles/arch/x86 though? IIUC we'll end up with an inconsistency between x86 and multilib amd64.
Ulrich
What if I want to build Gentoo on an old AMD Thunderbird which has
neither SSE1 nor the more important SSE2?
On Tue, 18 Oct 2022, David Seifert wrote:
What if I want to build Gentoo on an old AMD Thunderbird which has
neither SSE1 nor the more important SSE2?
On Tue, 18 Oct 2022, David Seifert wrote:
What if I want to build Gentoo on an old AMD Thunderbird which has
neither SSE1 nor the more important SSE2?
The -mfpmath=sse option is a no-op if the CPU doesn't support SSE,
i.e. it will use 387 arithmetics nevertheless.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (2 / 14) |
Uptime: | 101:38:05 |
Calls: | 8,363 |
Calls today: | 2 |
Files: | 13,165 |
Messages: | 5,898,006 |