diff --git a/clang/docs/LanguageExtensions.html b/clang/docs/LanguageExtensions.html index 5b8518b33054..d73e3026b1f8 100644 --- a/clang/docs/LanguageExtensions.html +++ b/clang/docs/LanguageExtensions.html @@ -27,6 +27,11 @@ td {
Clang supports some language features conditionally on some targets.
+ + +The X86 backend has these language extensions:
+ + +Annotating a pointer with address space #256 causes it to be code generated +relative to the X86 GS segment register. +Note that this is a very very low-level feature that should only be used if you +know what you're doing (for example in an OS kernel).
+ +Here is an example:
+ ++#define GS_RELATIVE __attribute__((address_space(256))) +int foo(int GS_RELATIVE *P) { + return *P; +} ++ +
Which compiles to (on X86-32):
+ ++_foo: + movl 4(%esp), %eax + movl %gs:(%eax), %eax + ret ++