diff options
Diffstat (limited to 'development/gcc.html')
-rw-r--r-- | development/gcc.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/development/gcc.html b/development/gcc.html index 3bd5c24..99a3117 100644 --- a/development/gcc.html +++ b/development/gcc.html @@ -213,7 +213,7 @@ accordingly to reduce number of jump instructions. See on <a href="https://godbolt.org/z/MbTHAP">compiler explorer</a>.</p> <p>The semantics of this hint are as follows, the compiler prioritises <code>expr == cond</code>. So <code>__builtin_expect(expr, 0)</code> means that we expect the <code>expr</code> to be <code>0</code> most of the time.</p> -<pre><code class="language-bash">echo " +<pre><code class="language-bash">echo " extern void foo(); extern void bar(); void run0(int x) { @@ -224,7 +224,7 @@ void run1(int x) { if (__builtin_expect(x,1)) { foo(); } else { bar(); } } -" | gcc -O2 -S -masm=intel -o /dev/stdout -xc - +" | gcc -O2 -S -masm=intel -o /dev/stdout -xc - </code></pre> <p>Will generate something similar to the following.</p> <ul> @@ -250,7 +250,7 @@ run1: </code></pre> <h2 id="abi-linux"><a class="header" href="#abi-linux">ABI (Linux)</a></h2> <ul> -<li>C ABI - <a href="https://www.uclibc.org/docs/psABI-x86_64.pdf">SystemV ABI</a></li> +<li>C ABI (x86_64) - <a href="https://gitlab.com/x86-psABIs/x86-64-ABI">SystemV ABI</a></li> <li>C++ ABI - <a href="https://itanium-cxx-abi.github.io/cxx-abi">C++ Itanium ABI</a></li> </ul> |