gcc/testsuite/gcc.target/arc/tmac-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-skip-if "" { ! { clmcpu } } } */ |
| 3 | /* { dg-options "-mcpu=hs38 -Os" } */ |
| 4 | |
| 5 | /* The compiler will assign r1r2 as a DI register, but it doesn't fit |
| 6 | the macd operation, hence we need to fall back on the mac |
| 7 | instruction. */ |
| 8 | typedef long long myint64_t; |
| 9 | |
| 10 | extern int d (int, myint64_t); |
| 11 | int b (int c) |
| 12 | { |
| 13 | int x = (int) d; |
| 14 | d (c, (myint64_t)x * 2 + 1); |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-assembler "mac\\\s+r1" } } */ |