Skip to content

Instantly share code, notes, and snippets.

@krisk0
Created July 22, 2025 11:50
Show Gist options
  • Select an option

  • Save krisk0/3da8421910ce118437e1dfd48c056709 to your computer and use it in GitHub Desktop.

Select an option

Save krisk0/3da8421910ce118437e1dfd48c056709 to your computer and use it in GitHub Desktop.
Macro to insert 15 different NOP's
#define dEbug(n) dEbug_##n();
#define dEbug_0() __asm__ __volatile__("mov x0, x0" ::: "memory")
#define dEbug_1() __asm__ __volatile__("mov x1, x1" ::: "memory")
#define dEbug_2() __asm__ __volatile__("mov x2, x2" ::: "memory")
#define dEbug_3() __asm__ __volatile__("mov x3, x3" ::: "memory")
#define dEbug_4() __asm__ __volatile__("mov x4, x4" ::: "memory")
#define dEbug_5() __asm__ __volatile__("mov x5, x5" ::: "memory")
#define dEbug_6() __asm__ __volatile__("mov x6, x6" ::: "memory")
#define dEbug_7() __asm__ __volatile__("mov x7, x7" ::: "memory")
#define dEbug_8() __asm__ __volatile__("mov x8, x8" ::: "memory")
#define dEbug_9() __asm__ __volatile__("mov x9, x9" ::: "memory")
#define dEbug_10() __asm__ __volatile__("mov x10, x10" ::: "memory")
#define dEbug_11() __asm__ __volatile__("mov x11, x11" ::: "memory")
#define dEbug_12() __asm__ __volatile__("mov x12, x12" ::: "memory")
#define dEbug_13() __asm__ __volatile__("mov x13, x13" ::: "memory")
#define dEbug_14() __asm__ __volatile__("mov x14, x14" ::: "memory")
#define dEbug_15() __asm__ __volatile__("mov x15, x15" ::: "memory")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment