Opened 8 years ago

Last modified 8 years ago

#4784 new Tasks

numeric/interval/hw_rounding for __amd64__

Reported by: Jim Bell <jim@…> Owned by: Boris Gubenko
Milestone: To Be Determined Component: interval
Version: Boost Development Trunk Severity: Problem
Keywords: hardware rounding control __amd64__ regression Cc: jim@…

Description

Interval fails regression tests requiring numeric/interval/hw_rounding.hpp. It gives

../boost/numeric/interval/hw_rounding.hpp:40:4: error: #error Boost.Numeric.Interval: Please specify rounding control mechanism.

My compiler defines amd64 (note the double underscores before and after). How do I determine the hardware rounding control mechanism?

Here's the AMD64 manual (pdf), but I don't understand things well enough to say which mechanism it uses.

Change History (7)

comment:1 Changed 8 years ago by Jim Bell <jim@…>

Wiki-formatting zapped my compiler define:

__amd64__

comment:2 Changed 8 years ago by Jim Bell <jim@…>

Component: Noneinterval
Owner: set to Boris Gubenko

comment:3 Changed 8 years ago by Jim Bell <jim@…>

Severity: ProblemRegression

Per GCC's install notes, amd64-*-* is an alias for x86_64-*-*, so the same treatment should apply, I think.

comment:4 Changed 8 years ago by Marshall Clow

Jim - did this work in a previous release, and is broken now? I'm trying to understand why this is a "regression".

comment:5 Changed 8 years ago by Jim Bell <jim@…>

I marked it 'regression' because it's putting yellow on the regression matrix for at least one platform (FBSD-64) and possibly more. Would another severity be more appropriate?

Either way, it seems documented in gcc and a very small change would fix it.

comment:6 Changed 8 years ago by Jim Bell <jim@…>

Sandia-pgi-10.1, which fails the same set of regressions, is also run on the amd64 chip. The pgCC command-line (from the regression runner) is:

pgcpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__THROW= -D__extension__= -D__amd64__ -D__SSE__ -D__MMX__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__PGI -I/sierra/Sntools/extras/compilers/pgi/linux86-64/10.1/include/CC -I/sierra/Sntools/extras/compilers/pgi/linux86-64/10.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -I/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -I/usr/include --gnu_version=40102 --preprocess -q foo.cpp

So both these macros are defined, which seems consistent with GCC:

__x86_64__   __amd64__

comment:7 Changed 8 years ago by Jim Bell <jim@…>

Keywords: regression added
Severity: RegressionProblem

Per fesetround() man page on FreeBSD,

The fegetround() and fesetround() functions conform to ISO/IEC 9899:1999 (``ISO C99'').

See also fenv().

Can't the C99 case, then, be chosen in hw_rounding.hpp for FreeBSD?

Note: See TracTickets for help on using tickets.