[docs] Improvements to CMake.rst
[oota-llvm.git] / docs / Extensions.rst
index cd489c0e540192b8dd5c3648d0ed74dc618ed9d3..c8ff07c2b0ca20fcbbfa117559e785be2e8828bc 100644 (file)
@@ -165,6 +165,29 @@ and ``.bar`` is associated to ``.foo``.
        .section        .foo,"bw",discard, "sym"
        .section        .bar,"rd",associative, "sym"
 
+
+ELF-Dependent
+-------------
+
+``.section`` Directive
+^^^^^^^^^^^^^^^^^^^^^^
+
+In order to support creating multiple sections with the same name and comdat,
+it is possible to add an unique number at the end of the ``.seciton`` directive.
+For example, the following code creates two sections named ``.text``.
+
+.. code-block:: gas
+
+       .section        .text,"ax",@progbits,unique,1
+        nop
+
+       .section        .text,"ax",@progbits,unique,2
+        nop
+
+
+The unique number is not present in the resulting object at all. It is just used
+in the assembler to differentiate the sections.
+
 Target Specific Behaviour
 =========================
 
@@ -195,3 +218,17 @@ range via a slight deviation.  It will generate an indirect jump as follows:
   blx r12
   sub.w sp, sp, r4
 
+Variable Length Arrays
+^^^^^^^^^^^^^^^^^^^^^^
+
+The reference implementation (Microsoft Visual Studio 2012) does not permit the
+emission of Variable Length Arrays (VLAs).
+
+The Windows ARM Itanium ABI extends the base ABI by adding support for emitting
+a dynamic stack allocation.  When emitting a variable stack allocation, a call
+to ``__chkstk`` is emitted unconditionally to ensure that guard pages are setup
+properly.  The emission of this stack probe emission is handled similar to the
+standard stack probe emission.
+
+The MSVC environment does not emit code for VLAs currently.
+