1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mhw-div -mhw-mul -mhw-mulx" } */
7 void foo(const uint8_t* str
, uint32_t* res
)
9 uint32_t rdVal0
, rdVal1
, rdVal2
;
10 rdVal0
= rdVal1
= rdVal2
= 0;
14 unsigned dig
= c
- '0';
19 x10
= (uint64_t)rdVal0
*10 + dig
;
20 rdVal0
= (uint32_t)x10
;
21 dig
= (uint32_t)(x10
>> 32);
23 x10
= (uint64_t)rdVal1
*10 + dig
;
24 rdVal1
= (uint32_t)x10
;
25 dig
= (uint32_t)(x10
>> 32);
27 rdVal2
= rdVal2
*10 + dig
;
34 /* { dg-final { scan-assembler-times "mulxuu\t" 2 } } */