kit

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

iarith_mul.c (279B)


      1 /* iarith: 32-bit integer multiply (and the mul+sub `msub`-style pattern).
      2  *
      3  * volatile operands force a real `mul w` rather than constant folding.
      4  * 100 * 7 - 658 = 42. */
      5 int test_main(void) {
      6   volatile int a = 100, b = 7, c = 658;
      7   int prod = a * b;
      8   return prod - c;
      9 }