From bac8a5d2822835cf47175d1162030653fadd5c09 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 15 Feb 2024 23:29:57 +0000 Subject: deploy: 4485708c972815bbb6df7f5a228683aa855d553d --- development/gcc.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'development/gcc.html') 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 compiler explorer.

The semantics of this hint are as follows, the compiler prioritises expr == cond. So __builtin_expect(expr, 0) means that we expect the expr to be 0 most of the time.

-
echo "
+
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 -
 

Will generate something similar to the following.

ABI (Linux)

-- cgit v1.2.3