This is an archive of the discontinued LLVM Phabricator instance.

[libc] Set the ES bit when raising FP exceptions on x86
AbandonedPublic

Authored by michaelrj on Jan 28 2021, 11:51 AM.

Details

Reviewers
sivachandra
Summary

This change brings the synchronization of raised exceptions in line with
"Intel 64 and IA-32 Architectures Software Developer's Manual, Vol 1"
sections 8.6 and 8.7.

Diff Detail

Event Timeline

michaelrj created this revision.Jan 28 2021, 11:51 AM
michaelrj requested review of this revision.Jan 28 2021, 11:51 AM
sivachandra added inline comments.Jan 28 2021, 12:42 PM
libc/utils/FPUtil/x86_64/FEnv.h
199

Add a comment here explaining that this functions returns a bit map of all enabled exceptions.

202

We usually try to be formal in multi-line comments. So, I would suggest a wording like this:

// The exceptions are enabled if the bit is zero (unmasked), 
// so that is why the negation before the & operation.
sivachandra accepted this revision.Jan 28 2021, 12:44 PM
sivachandra edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 28 2021, 12:44 PM
sivachandra retitled this revision from [libc] set the ES bit when raising FP exceptions on x86 to [libc] Set the ES bit when raising FP exceptions on x86.Jan 28 2021, 12:45 PM
michaelrj updated this revision to Diff 319946.Jan 28 2021, 1:11 PM
michaelrj marked 2 inline comments as done.
michaelrj edited the summary of this revision. (Show Details)

documentation changes

michaelrj abandoned this revision.Jun 28 2022, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2022, 5:02 PM
Herald added a subscriber: jsji. · View Herald Transcript