diff options
author | JF Bastien <jfbastien@apple.com> | 2019-07-14 18:33:51 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2019-07-14 18:33:51 +0000 |
commit | 990bc2d5653ed199c3e7f881b317e2ef74195348 (patch) | |
tree | 6b5633e9b725cd8100ee20a24e6c9f73b1ca921f /docs/LanguageExtensions.rst | |
parent | 54ed9d692456b4dd2eb4cfe37debef897caeed14 (diff) | |
download | clang-990bc2d5653ed199c3e7f881b317e2ef74195348.tar.gz |
Support __seg_fs and __seg_gs on x86
Summary:
GCC supports named address spaces macros:
https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html
clang does as well with address spaces:
https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments
Add the __seg_fs and __seg_gs macros for compatibility with GCC.
<rdar://problem/52944935>
Subscribers: jkorous, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64676
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LanguageExtensions.rst')
-rw-r--r-- | docs/LanguageExtensions.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/LanguageExtensions.rst b/docs/LanguageExtensions.rst index ecbf04c3c8..266309c6ce 100644 --- a/docs/LanguageExtensions.rst +++ b/docs/LanguageExtensions.rst @@ -2465,6 +2465,10 @@ Which compiles to (on X86-32): movl %gs:(%eax), %eax ret +You can also use the GCC compatibility macros ``__seg_fs`` and ``__seg_gs`` for +the same purpose. The preprocessor symbols ``__SEG_FS`` and ``__SEG_GS`` +indicate their support. + PowerPC Language Extensions ------------------------------ |