Debian Codegraph @

gcc/testsuite/gcc.target/riscv/xtheadfmemidx-uindex-zbb.c

raw
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
3 /* { dg-options "-march=rv64gc_zbb_xtheadmemidx -mabi=lp64d" { target { rv64 } } } */
4 /* { dg-options "-march=rv32imafc_zbb_xtheadmemidx -mabi=ilp32f" { target { rv32 } } } */
5
6 const unsigned char *
7 read_uleb128(const unsigned char *p, unsigned long *val)
8 {
9 unsigned int shift = 0;
10 unsigned char byte;
11 unsigned long result;
12
13 result = 0;
14 do
15 {
16 byte = *p++;
17 result |= ((unsigned long)byte & 0x7f) << shift;
18 shift += 7;
19 } while (byte & 0x80);
20
21 *val = result;
22 return p;
23 }
24
25 void test(const unsigned char *p, unsigned long utmp)
26 {
27 p = read_uleb128(p, &utmp);
28 }
29
30 /* { dg-final { scan-assembler-not {\mlb\ta[0-9],\(a[0-9]\),1,0\M} } } */