Page MenuHomePhabricator

[Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL
ClosedPublic

Authored by pirama on Aug 30 2017, 10:15 AM.

Diff Detail

Repository
rC Clang

Event Timeline

pirama created this revision.Aug 30 2017, 10:15 AM

It looks like all architectures that Clang supports have denorm support. AFAICT, none of them have the "indeterminable" behavior. So it seems safe to define these macros here.

@bruno The test lib/Headers/darwin.c will now pass even if the include_next for Darwin fails. If there are more definitions in the Darwin float.h, I can update to test that definition instead of FLT_HAS_SUBNORM.

rsmith accepted this revision.Sep 13 2017, 5:35 PM

LGTM

This revision is now accepted and ready to land.Sep 13 2017, 5:35 PM

@bruno Any suggestion on how to update test/Headers/float-darwin,c* so make it check the include_next? I am unable to find the darwin-specific float.h inside an XCode installation directory.

  • Oops, my earlier comment had the wrong test name
joerg added a subscriber: joerg.Sep 15 2017, 1:39 AM

So what about targets that don't support subnormals? I'm moderately sure ARM falls into this category given the right phase of the moon.

So what about targets that don't support subnormals? I'm moderately sure ARM falls into this category given the right phase of the moon.

Clang defines __FLT_HAS_DENORM__ and friends unconditionally, so I thought we could do this for FLT_HAS_SUBNORM as well, considering that gcc did the same. But that might be misleading because gcc's float.h was just for the target of that particular gcc build.

Am I right to understand that __FLT_HAS_DENORM__ signifies *compiler* support for denorms as opposed to support on the *platforms* supported? If so, it might support our alternative consideration of defining these macros in the bionic/libc headers for Android (and rely on the include_next similar to Windows and Darwin).

pirama updated this revision to Diff 124313.Nov 26 2017, 2:07 PM
  • Switch kryo to use -mcpu=cortex-a57 when invoking the assembler
pirama updated this revision to Diff 124314.Nov 26 2017, 2:11 PM

Revert to previous patch after accidental update

pirama updated this revision to Diff 124315.Nov 26 2017, 2:12 PM

Actually revert

Harbormaster completed remote builds in B12476: Diff 124315.
pirama updated this revision to Diff 139666.Mar 23 2018, 4:27 PM
  • [CodeGen] Mark fma as const for Android
pirama updated this revision to Diff 139667.Mar 23 2018, 4:28 PM
  • [CodeGen] Mark fma as const for Android
pirama updated this revision to Diff 139670.Mar 23 2018, 4:30 PM

Remove unexpected change from another patch.

Harbormaster completed remote builds in B16408: Diff 139670.
ldionne accepted this revision.Aug 3 2018, 3:34 PM
ldionne added a subscriber: ldionne.

What are we waiting for to move forward with this change?

Sorry this fell of my radar. I've rebased the patch.

Since this has been inactive for a while, lets wait for a couple of days to see if there are any other comments. If there are no objections, I'll submit this on Wednesday.

Sorry this fell of my radar. I've rebased the patch.

Since this has been inactive for a while, lets wait for a couple of days to see if there are any other comments. If there are no objections, I'll submit this on Wednesday.

Ok. FWIW, I was about to submit exactly the same patch when I found yours. This solves a problem for me.

This revision was automatically updated to reflect the committed changes.