diff options
author | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2014-10-06 14:45:26 +0400 |
---|---|---|
committer | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2014-10-07 19:03:20 +0400 |
commit | 50df9d68eaa85268ca266a49913d48000a338e72 (patch) | |
tree | 243b74a9f991c0f9d97095ec48d60a5699c2ae1d /docs | |
parent | cab12cdf943a439ffa5dfba1e66b749520982a4f (diff) | |
download | ndk-50df9d68eaa85268ca266a49913d48000a338e72.tar.gz |
gcc-4.4 (at least) forces stack to be aligned to 16 bytes for x86 (llvm is compliant with gcc).
This patch
1) Clarify x86 ABI to force stack alignment to be 16 bytes.
2) Removes "-mstackrealign", which has negative performance impact, from ABI.
For why gcc chooses to stay with 16 bytes, please, refer to:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496
Change-Id: Ifc7bfab703d0c0a4c6aa74fc302434f58bd270ed
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html b/docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html index 9858ca995..1737a44f7 100644 --- a/docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html +++ b/docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html @@ -245,8 +245,7 @@ referred to as "x86" or "IA-32". Characteristics of this ABI include:</p> <li>instructions normally generated by GCC with the following compiler flags:</li> </ul> -<pre class="fragment">-march=i686 -mtune=intel -mstackrealign -mssse3 --mfpmath=sse -m32 +<pre class="fragment">-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 </pre><p>These flags target the the Pentium Pro instruction set, along with the the MMX, <a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>, SSE2, <a @@ -278,6 +277,10 @@ extensions, including, but not limited to:</p> </ul> <p>You can still use these, as long as you use runtime feature-probing to enable them, and provide fallbacks for devices that do not support them.</p> +<p>The NDK toolchain assumes 16 byte stack alignment. Tools and options used by +default enforce this rule. It is the user's responsibilty to ensure that stack +alignment is maintained if they write assembly code, and to ensure that other +compilers also obey this rule.</p> <p>Please refer to the following documents for more details:</p> <ul> <li><a |