kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

asm_branch_escape.c (368B)


      1 /* Negative fixture: the snippet's `br 0` at top level (depth 0) would
      2  * branch out of the synthetic frame. The wasm backend must reject this
      3  * before emission. Paired with check_asm.sh's escape-branch assertion. */
      4 int f(int x) {
      5   int r;
      6   __asm__ volatile(
      7       "local.get 0\n"
      8       "br 0\n"
      9       "local.set 1\n"
     10       : "=r"(r)
     11       : "r"(x));
     12   return r;
     13 }