aboutsummaryrefslogtreecommitdiffhomepage
path: root/trace_profile/src/noploop.c
blob: 76e664f9d09ec24043938e4fd4dd497b1228f6e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#define NOP4        "nop\nnop\nnop\nnop\n"
#define NOP32       NOP4   NOP4   NOP4   NOP4   NOP4   NOP4   NOP4   NOP4
#define NOP256      NOP32  NOP32  NOP32  NOP32  NOP32  NOP32  NOP32  NOP32
#define NOP2048     NOP256 NOP256 NOP256 NOP256 NOP256 NOP256 NOP256 NOP256

int main() {
  for (unsigned i = 0; i < 2000000; ++i) {
    asm volatile(NOP2048);
  }
}