brintos

brintos / llvm-project-archived public Read only

0
0
Text · 401 B · 88eb2a8 Raw
26 lines · cpp
1int f() {2  // This will be removed by BOLT but they make sure we have some extra space3  // to insert branches and don't run out of space when rewriting the function.4  asm("nop");5  asm("nop");6  asm("nop");7  asm("nop");8  asm("nop");9  int x = 0xBEEF;10  if (x & 0x32) {11    x++;12  } else {13    --x;14  }15  return x;16}17 18int g() {19  return f() + 1;20}21 22int main() {23  int q = g() * f();24  return 0;25}26