This is an archive of the discontinued LLVM Phabricator instance.

Headers: be a bit more careful about inline asm
ClosedPublic

Authored by compnerd on Apr 29 2014, 10:12 PM.

Details

Reviewers
rnk
Summary

Conditionally include x86intrin.h if we are building for x86 or x86_64.
Conditionalise definition of inline assembly routines which use x86 or x86_64
inline assembly. This is needed as clang can target Windows on ARM where these
definitions may be included into user code.

Diff Detail

Event Timeline

compnerd updated this revision to Diff 8955.Apr 29 2014, 10:12 PM
compnerd retitled this revision from to headers: be a bit more careful about inline asm.
compnerd updated this object.
compnerd edited the test plan for this revision. (Show Details)
compnerd added a reviewer: rnk.
compnerd set the repository for this revision to rL LLVM.
compnerd added a subscriber: Unknown Object (MLST).
rnk edited edge metadata.Apr 30 2014, 9:27 AM

IMO intrin.h should avoid including x86intrin.h on non-x86 platforms, rather than making ia32intrin.h do nothing on non-x86. Does that work for you?

I think that is perfectly reasonable. I did do that, but then backtracked away from it. Would you be against these changes to ia32intrin.h in addition to the inclusion guard?

compnerd updated this revision to Diff 10672.Jun 19 2014, 6:51 PM
compnerd retitled this revision from headers: be a bit more careful about inline asm to Headers: be a bit more careful about inline asm.
compnerd updated this object.
compnerd edited edge metadata.
rnk accepted this revision.Jun 23 2014, 1:57 PM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jun 23 2014, 1:57 PM
abdulras closed this revision.Jun 25 2014, 11:15 AM
abdulras added a subscriber: abdulras.

SVN r211716.