1 /* { dg-do compile } */
2 /* { dg-options "-meb isa_rev>=2 -mgp64" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4 /* { dg-final { scan-assembler-times "\tins\t|\tdins\t" 1 } } */
5 /* { dg-final { scan-assembler-times "\tsll\t|\tins\t" 1 } } */
7 /* When inserting something into the top bit of a 32-bit structure,
8 we must make sure that the register remains properly sign-extended.
9 There are two ways of doing this:
11 - use purely 32-bit bit manipulations (a single INS, matched twice here).
12 - use a 64-bit bit manipulation (DINS), and sign-extend the result. We
13 check for this extension using SLL. */
25 asm volatile ("" : "=r"(s
));
27 asm volatile ("" :: "r"(s
));