public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/3] alpha: Update ulps
@ 2012-09-13 20:12 Richard Henderson
  2012-09-13 20:12 ` [PATCH 2/3] alpha: Update localplt.data Richard Henderson
  2012-09-13 20:12 ` [PATCH 3/3] alpha: Streamline __setfpucw Richard Henderson
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Henderson @ 2012-09-13 20:12 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                  |   2 +
 ports/sysdeps/alpha/fpu/libm-test-ulps | 575 ++++++++++++++++++++++++++++++++-
 2 files changed, 573 insertions(+), 4 deletions(-)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index fbe42ac..1abf973 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,5 +1,7 @@
 2012-12-13  Richard Henderson  <rth@redhat.com>
 
+	* sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
+
 	* sysdeps/alpha/fpu/get-rounding-mode.h: New file.
 
 2012-08-30  Richard Henderson  <rth@redhat.com>
diff --git a/ports/sysdeps/alpha/fpu/libm-test-ulps b/ports/sysdeps/alpha/fpu/libm-test-ulps
index bc3d828..a5d2941 100644
--- a/ports/sysdeps/alpha/fpu/libm-test-ulps
+++ b/ports/sysdeps/alpha/fpu/libm-test-ulps
@@ -820,20 +820,116 @@ ildouble: 1
 ldouble: 1
 
 # clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
 float: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - 0 i":
+float: 1
+ifloat: 1
 Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
 double: 1
 idouble: 1
 Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
 float: 1
 ifloat: 1
+Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
+float: 1
+ifloat: 1
 
 # clog10
 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -846,6 +942,53 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i) == 308.2409272754311106024666378243768099991 - 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i) == 38.51805116050395969095658815123105801479 + 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i) == 38.51805116050395969095658815123105801479 - 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
 Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
 ildouble: 1
 ldouble: 1
@@ -903,6 +1046,46 @@ ifloat: 1
 Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-60 i) == 4.285899851347756188767674032946882584784e-19 + 4.285899850759344225805480528847018395861e-19 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
 double: 1
 float: 1
@@ -923,22 +1106,65 @@ ldouble: 1
 Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
 double: 1
 idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
 Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
 double: 1
 idouble: 1
 Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
 double: 1
 idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
 Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
 double: 1
 float: 1
@@ -961,6 +1187,12 @@ idouble: 1
 ifloat: 1
 
 # cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
 Test "cos (M_PI_6l * 2.0) == 0.5":
 double: 1
 idouble: 1
@@ -1128,6 +1360,8 @@ ifloat: 1
 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
 double: 1
 float: 4
@@ -1329,6 +1563,20 @@ ildouble: 1
 ldouble: 1
 
 # csqrt
+Test "Real part of: csqrt (-0x1.0000000000000000000000000001p-16382 - 0x1.0000000000000000000000000001p-16382 i) == 8.344545284118961663847948339519226074126e-2467 - 2.014551439675644900022606748976158925145e-2466 i":
+ldouble: 1
+Test "Real part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.0000000000001p-1022 - 0x1.0000000000001p-1022 i) == 6.788430486774966350907249113759995429568e-155 - 1.638872094839911521020410942677082920935e-154 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i) == 4.934094449071842328766868579214125217132e-20 - 1.191195773697904627170323731331667740087e-19 i":
+double: 1
+idouble: 1
 Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
 float: 1
 ifloat: 1
@@ -1342,6 +1590,20 @@ ldouble: 1
 Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i) == 2.014551439675644900022606748976158925145e-2466 + 8.344545284118961663847948339519226074126e-2":
+ldouble: 1
+Test "Real part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000001p-1022 + 0x1.0000000000001p-1022 i) == 1.638872094839911521020410942677082920935e-154 + 6.788430486774966350907249113759995429568e-155 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i) == 1.191195773697904627170323731331667740087e-19 + 4.934094449071842328766868579214125217132e-20 i":
+double: 1
+idouble: 1
 Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
 float: 1
 ifloat: 1
@@ -1426,6 +1688,97 @@ Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636
 ildouble: 1
 ldouble: 1
 
+# ctan_downward
+Test "Real part of: ctan_downward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+# ctan_tonearest
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+# ctan_towardzero
+Test "Real part of: ctan_towardzero (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
 # ctanh
 Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
 double: 1
@@ -1490,6 +1843,97 @@ Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425
 ildouble: 1
 ldouble: 1
 
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 4
+ldouble: 4
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_downward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 2
+ldouble: 2
+
+# ctanh_tonearest
+Test "Real part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_tonearest (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_towardzero (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_upward
+Test "Real part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
 # erf
 Test "erf (1.25) == 0.922900128256458230136523481197281140":
 double: 1
@@ -1576,6 +2020,9 @@ ildouble: 1
 ldouble: 1
 
 # expm1
+Test "expm1 (-79.0) == -0.9999999999999999999999999999999999509391":
+ildouble: 1
+ldouble: 1
 Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
 double: 1
 idouble: 1
@@ -2026,6 +2473,12 @@ float: 1
 ifloat: 1
 
 # sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
 double: 1
 idouble: 1
@@ -2567,10 +3020,16 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: Imaginary part of "clog":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "clog10":
-double: 1
+double: 2
 float: 1
-idouble: 1
+idouble: 2
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -2580,8 +3039,8 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: "cos":
 double: 2
@@ -2705,6 +3164,60 @@ idouble: 1
 ildouble: 2
 ldouble: 2
 
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
 Function: Real part of "ctanh":
 double: 1
 float: 1
@@ -2721,6 +3234,60 @@ ifloat: 2
 ildouble: 2
 ldouble: 2
 
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
 Function: "erf":
 double: 1
 idouble: 1
-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/3] alpha: Update localplt.data
  2012-09-13 20:12 [PATCH 1/3] alpha: Update ulps Richard Henderson
@ 2012-09-13 20:12 ` Richard Henderson
  2012-09-15  1:11   ` Matt Turner
  2012-09-13 20:12 ` [PATCH 3/3] alpha: Streamline __setfpucw Richard Henderson
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2012-09-13 20:12 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                                  | 4 ++++
 ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 1abf973..d00b1e9 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,5 +1,9 @@
 2012-12-13  Richard Henderson  <rth@redhat.com>
 
+	* sysdeps/unix/sysv/linux/alpha/nptl/localplt.data: Add optional
+	entries for _OtsConvertFloatTX, _OtsCvtQUX, _OtsCvtXQ, _OtsGtrX,
+	_OtsLeqX, _OtsNintXQ.
+
 	* sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
 
 	* sysdeps/alpha/fpu/get-rounding-mode.h: New file.
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
index 00700d1..6b2e515 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
@@ -1,12 +1,18 @@
 libc.so: _OtsAddX ?
+libc.so: _OtsConvertFloatTX ?
 libc.so: _OtsConvertFloatXT ?
+libc.so: _OtsCvtQUX ?
 libc.so: _OtsCvtQX ?
+libc.so: _OtsCvtXQ ?
 libc.so: _OtsDivX ?
 libc.so: _OtsEqlX ?
 libc.so: _OtsGeqX ?
+libc.so: _OtsGtrX ?
+libc.so: _OtsLeqX ?
 libc.so: _OtsLssX ?
 libc.so: _OtsMulX ?
 libc.so: _OtsNeqX ?
+libc.so: _OtsNintXQ ?
 libc.so: _OtsSubX ?
 libc.so: _Unwind_Find_FDE
 libc.so: calloc ?
-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/3] alpha: Streamline __setfpucw
  2012-09-13 20:12 [PATCH 1/3] alpha: Update ulps Richard Henderson
  2012-09-13 20:12 ` [PATCH 2/3] alpha: Update localplt.data Richard Henderson
@ 2012-09-13 20:12 ` Richard Henderson
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2012-09-13 20:12 UTC (permalink / raw)
  To: libc-ports

The convert_bit macro allows the compiler to translate the bit
positions more efficiently.  The assumption of only running at
program startup allows eliding the __ieee_get_fp_control call.
---
 ports/ChangeLog.alpha                          |  3 +
 ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c | 88 ++++++++++----------------
 2 files changed, 38 insertions(+), 53 deletions(-)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index d00b1e9..ab807f7 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,5 +1,8 @@
 2012-12-13  Richard Henderson  <rth@redhat.com>
 
+	* sysdeps/unix/sysv/linux/alpha/setfpucw.c (__setfpucw): Rewrite
+	with the assumption of being used at program startup only.
+
 	* sysdeps/unix/sysv/linux/alpha/nptl/localplt.data: Add optional
 	entries for _OtsConvertFloatTX, _OtsCvtQUX, _OtsCvtXQ, _OtsGtrX,
 	_OtsLeqX, _OtsNintXQ.
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index becc11f..99ffd06 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,5 +1,5 @@
 /* Set FP exception mask and rounding mode.
-   Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -17,63 +17,45 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fpu_control.h>
-#include <asm/fpu.h>
+#include <fenv_libc.h>
 
-extern void		__ieee_set_fp_control (unsigned long);
-libc_hidden_proto(__ieee_set_fp_control)
 
-extern unsigned long	__ieee_get_fp_control (void);
-libc_hidden_proto(__ieee_get_fp_control)
-
-static inline unsigned long
-rdfpcr (void)
-{
-  unsigned long fpcr;
-  asm ("excb; mf_fpcr %0" : "=f"(fpcr));
-  return fpcr;
-}
-
-
-static inline void
-wrfpcr (unsigned long fpcr)
-{
-  asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr));
-}
+#define convert_bit(M, F, T)		\
+    ((T) < (F)				\
+     ? ((M) / ((F) / (T))) & (T)	\
+     : ((M) & (F)) * ((T) / (F)))
 
 
 void
 __setfpucw (fpu_control_t fpu_control)
 {
-  unsigned long fpcr = 0, fpcw = 0;
-
-  if (!fpu_control)
-    fpu_control = _FPU_DEFAULT;
-
-  /* first, set dynamic rounding mode: */
-
-  fpcr = rdfpcr();
-  fpcr &= ~FPCR_DYN_MASK;
-  switch (fpu_control & 0xc00)
-    {
-    case _FPU_RC_NEAREST:	fpcr |= FPCR_DYN_NORMAL; break;
-    case _FPU_RC_DOWN:		fpcr |= FPCR_DYN_MINUS; break;
-    case _FPU_RC_UP:		fpcr |= FPCR_DYN_PLUS; break;
-    case _FPU_RC_ZERO:		fpcr |= FPCR_DYN_CHOPPED; break;
-    }
-  wrfpcr(fpcr);
-
-  /* now tell kernel about traps that we like to hear about: */
-
-  fpcw = __ieee_get_fp_control();
-  fpcw &= ~IEEE_TRAP_ENABLE_MASK;
-
-  if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV;
-  if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF;
-  if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE;
-  if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF;
-  if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE;
-
-  __fpu_control = fpu_control;	/* update global copy */
-
-  __ieee_set_fp_control(fpcw);
+  unsigned long fpcr, swcr, fc = (int)fpu_control;
+
+  /* ??? If this was a real external interface we'd want to read the current
+     exception state with __ieee_get_fp_control.  But this is an internal
+     function only called at process startup, so there's no point in trying
+     to preserve exceptions that cannot have been raised yet.  Indeed, this
+     entire function is likely to be one big nop unless the user overrides
+     the default __fpu_control variable.  */
+
+  /* Convert the rounding mode from fpu_control.h format.  */
+  const unsigned long conv_rnd
+    = (  (FE_TOWARDZERO << (_FPU_RC_ZERO >> 8))
+       | (FE_DOWNWARD << (_FPU_RC_DOWN >> 8))
+       | (FE_TONEAREST << (_FPU_RC_NEAREST >> 8))
+       | (FE_UPWARD << (_FPU_RC_UP >> 8)));
+
+  fpcr = ((conv_rnd >> ((fc >> 8) & 3)) & 3) << FPCR_ROUND_SHIFT;
+
+  /* Convert the exception mask from fpu_control.h format.  */
+  swcr  = convert_bit (~fc, _FPU_MASK_IM, FE_INVALID >> SWCR_ENABLE_SHIFT);
+  swcr |= convert_bit (~fc, _FPU_MASK_DM, FE_UNDERFLOW >> SWCR_ENABLE_SHIFT);
+  swcr |= convert_bit (~fc, _FPU_MASK_ZM, FE_DIVBYZERO >> SWCR_ENABLE_SHIFT);
+  swcr |= convert_bit (~fc, _FPU_MASK_OM, FE_OVERFLOW >> SWCR_ENABLE_SHIFT);
+  swcr |= convert_bit (~fc, _FPU_MASK_PM, FE_INEXACT >> SWCR_ENABLE_SHIFT);
+
+  /* Install everything.  */
+  __fpu_control = fc;
+  asm volatile ("mt_fpcr %0" : : "f"(fpcr));
+  __ieee_set_fp_control(swcr);
 }
-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] alpha: Update localplt.data
  2012-09-13 20:12 ` [PATCH 2/3] alpha: Update localplt.data Richard Henderson
@ 2012-09-15  1:11   ` Matt Turner
  2012-09-16 16:50     ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Turner @ 2012-09-15  1:11 UTC (permalink / raw)
  To: Richard Henderson; +Cc: libc-ports

On Thu, Sep 13, 2012 at 1:11 PM, Richard Henderson <rth@twiddle.net> wrote:
> ---
>  ports/ChangeLog.alpha                                  | 4 ++++
>  ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data | 6 ++++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
> index 1abf973..d00b1e9 100644
> --- a/ports/ChangeLog.alpha
> +++ b/ports/ChangeLog.alpha
> @@ -1,5 +1,9 @@
>  2012-12-13  Richard Henderson  <rth@redhat.com>
>
> +       * sysdeps/unix/sysv/linux/alpha/nptl/localplt.data: Add optional
> +       entries for _OtsConvertFloatTX, _OtsCvtQUX, _OtsCvtXQ, _OtsGtrX,
> +       _OtsLeqX, _OtsNintXQ.
> +
>         * sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
>
>         * sysdeps/alpha/fpu/get-rounding-mode.h: New file.
> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
> index 00700d1..6b2e515 100644
> --- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
> +++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
> @@ -1,12 +1,18 @@
>  libc.so: _OtsAddX ?
> +libc.so: _OtsConvertFloatTX ?
>  libc.so: _OtsConvertFloatXT ?
> +libc.so: _OtsCvtQUX ?
>  libc.so: _OtsCvtQX ?
> +libc.so: _OtsCvtXQ ?
>  libc.so: _OtsDivX ?
>  libc.so: _OtsEqlX ?
>  libc.so: _OtsGeqX ?
> +libc.so: _OtsGtrX ?
> +libc.so: _OtsLeqX ?
>  libc.so: _OtsLssX ?
>  libc.so: _OtsMulX ?
>  libc.so: _OtsNeqX ?
> +libc.so: _OtsNintXQ ?
>  libc.so: _OtsSubX ?
>  libc.so: _Unwind_Find_FDE
>  libc.so: calloc ?
> --
> 1.7.11.4
>

These _Ots* functions are from Compaq's libots which does provides
128-bit float functions?

How does one enable glibc's use of libots?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] alpha: Update localplt.data
  2012-09-15  1:11   ` Matt Turner
@ 2012-09-16 16:50     ` Richard Henderson
  2012-09-16 17:50       ` Matt Turner
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2012-09-16 16:50 UTC (permalink / raw)
  To: Matt Turner; +Cc: libc-ports

On 2012-09-14 18:10, Matt Turner wrote:
> These _Ots* functions are from Compaq's libots which does provides
> 128-bit float functions?
> 
> How does one enable glibc's use of libots?

Err, they're from glibc, but they do provide 128-bit fp.
Enabled with --with-long-double-128 in gcc, which I thought
was the default these days.


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] alpha: Update localplt.data
  2012-09-16 16:50     ` Richard Henderson
@ 2012-09-16 17:50       ` Matt Turner
  2012-09-16 18:36         ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Turner @ 2012-09-16 17:50 UTC (permalink / raw)
  To: Richard Henderson; +Cc: libc-ports

On Sun, Sep 16, 2012 at 9:50 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 2012-09-14 18:10, Matt Turner wrote:
>> These _Ots* functions are from Compaq's libots which does provides
>> 128-bit float functions?
>>
>> How does one enable glibc's use of libots?
>
> Err, they're from glibc, but they do provide 128-bit fp.
> Enabled with --with-long-double-128 in gcc, which I thought
> was the default these days.

Ah, I see. So gcc support was written using libots and later glibc
implemented a compatible set of functions? VCS history seems to
suggest this.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] alpha: Update localplt.data
  2012-09-16 17:50       ` Matt Turner
@ 2012-09-16 18:36         ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2012-09-16 18:36 UTC (permalink / raw)
  To: Matt Turner; +Cc: libc-ports

On 2012-09-16 10:49, Matt Turner wrote:
> Ah, I see. So gcc support was written using libots and later glibc
> implemented a compatible set of functions? VCS history seems to
> suggest this.

Yes.


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-16 18:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13 20:12 [PATCH 1/3] alpha: Update ulps Richard Henderson
2012-09-13 20:12 ` [PATCH 2/3] alpha: Update localplt.data Richard Henderson
2012-09-15  1:11   ` Matt Turner
2012-09-16 16:50     ` Richard Henderson
2012-09-16 17:50       ` Matt Turner
2012-09-16 18:36         ` Richard Henderson
2012-09-13 20:12 ` [PATCH 3/3] alpha: Streamline __setfpucw Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).