gcc/testsuite/gcc.target/mips/pr113179.c
raw| 1 | /* Check if the operand of INS is sign-extended on MIPS64. */ |
| 2 | /* { dg-options "-mips64r2 -mabi=64" } */ |
| 3 | /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 4 | |
| 5 | struct xx { |
| 6 | int a:1; |
| 7 | int b:24; |
| 8 | int c:6; |
| 9 | int d:1; |
| 10 | }; |
| 11 | |
| 12 | long long xx (struct xx *a, long long b) { |
| 13 | a->d = b; |
| 14 | return b+1; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-assembler "\tsll\t\\\$3,\\\$5,0" } } */ |
| 18 | /* { dg-final { scan-assembler "\tdaddiu\t\\\$2,\\\$5,1" } } */ |