kit

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

invalid_asm_wide_reg_rv32.toy (445B)


      1 // A 64-bit value bound to a register ("r") asm constraint cannot be honored on
      2 // a 32-bit target: the value needs a register pair, which the inline-asm path
      3 // does not model, so it would silently truncate to the low 32 bits. Reject it.
      4 // Compiled for riscv32 (see the .ccargs sidecar); on a 64-bit host an i64 fits
      5 // a single GPR and this is accepted.
      6 fn main(): i64 {
      7   @asm<void>("", outputs(), inputs(in("r", 42 as i64)));
      8   return 0;
      9 }