| 1 |
/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" { target { ! ilp32 } } } } */ |
| 2 |
|
| 3 |
#include "test_sve_acle.h" |
| 4 |
|
| 5 |
/* |
| 6 |
** prfw_base: |
| 7 |
** prfw pldl1keep, p0, \[x0\] |
| 8 |
** ret |
| 9 |
*/ |
| 10 |
TEST_PREFETCH (prfw_base, uint8_t, |
| 11 |
svprfw (p0, x0, SV_PLDL1KEEP), |
| 12 |
svprfw (p0, x0, SV_PLDL1KEEP)) |
| 13 |
|
| 14 |
/* |
| 15 |
** prfw_u8_index: |
| 16 |
** add (x[0-9+]), (x0, x1|x1, x0) |
| 17 |
** prfw pldl1keep, p0, \[x0\] |
| 18 |
** ret |
| 19 |
*/ |
| 20 |
TEST_PREFETCH (prfw_u8_index, uint8_t, |
| 21 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP), |
| 22 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP)) |
| 23 |
|
| 24 |
/* |
| 25 |
** prfw_u8_1: |
| 26 |
** add (x[0-9+]), x0, #?1 |
| 27 |
** prfw pldl1keep, p0, \[\1\] |
| 28 |
** ret |
| 29 |
*/ |
| 30 |
TEST_PREFETCH (prfw_u8_1, uint8_t, |
| 31 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP), |
| 32 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP)) |
| 33 |
|
| 34 |
/* |
| 35 |
** prfw_u16_index: |
| 36 |
** add (x[0-9+]), x0, x1, lsl #?1 |
| 37 |
** prfw pldl1keep, p0, \[\1\] |
| 38 |
** ret |
| 39 |
*/ |
| 40 |
TEST_PREFETCH (prfw_u16_index, uint16_t, |
| 41 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP), |
| 42 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP)) |
| 43 |
|
| 44 |
/* |
| 45 |
** prfw_u16_1: |
| 46 |
** add (x[0-9+]), x0, #?2 |
| 47 |
** prfw pldl1keep, p0, \[\1\] |
| 48 |
** ret |
| 49 |
*/ |
| 50 |
TEST_PREFETCH (prfw_u16_1, uint16_t, |
| 51 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP), |
| 52 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP)) |
| 53 |
|
| 54 |
/* |
| 55 |
** prfw_u32_index: |
| 56 |
** prfw pldl1keep, p0, \[x0, x1, lsl #?2\] |
| 57 |
** ret |
| 58 |
*/ |
| 59 |
TEST_PREFETCH (prfw_u32_index, uint32_t, |
| 60 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP), |
| 61 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP)) |
| 62 |
|
| 63 |
/* |
| 64 |
** prfw_u32_1: |
| 65 |
** add (x[0-9+]), x0, #?4 |
| 66 |
** prfw pldl1keep, p0, \[\1\] |
| 67 |
** ret |
| 68 |
*/ |
| 69 |
TEST_PREFETCH (prfw_u32_1, uint32_t, |
| 70 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP), |
| 71 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP)) |
| 72 |
|
| 73 |
/* |
| 74 |
** prfw_u64_index: |
| 75 |
** add (x[0-9+]), x0, x1, lsl #?3 |
| 76 |
** prfw pldl1keep, p0, \[\1\] |
| 77 |
** ret |
| 78 |
*/ |
| 79 |
TEST_PREFETCH (prfw_u64_index, uint64_t, |
| 80 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP), |
| 81 |
svprfw (p0, x0 + x1, SV_PLDL1KEEP)) |
| 82 |
|
| 83 |
/* |
| 84 |
** prfw_u64_1: |
| 85 |
** add (x[0-9+]), x0, #?8 |
| 86 |
** prfw pldl1keep, p0, \[\1\] |
| 87 |
** ret |
| 88 |
*/ |
| 89 |
TEST_PREFETCH (prfw_u64_1, uint64_t, |
| 90 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP), |
| 91 |
svprfw (p0, x0 + 1, SV_PLDL1KEEP)) |
| 92 |
|
| 93 |
/* |
| 94 |
** prfw_pldl1strm: |
| 95 |
** prfw pldl1strm, p0, \[x0\] |
| 96 |
** ret |
| 97 |
*/ |
| 98 |
TEST_PREFETCH (prfw_pldl1strm, uint8_t, |
| 99 |
svprfw (p0, x0, SV_PLDL1STRM), |
| 100 |
svprfw (p0, x0, SV_PLDL1STRM)) |
| 101 |
|
| 102 |
/* |
| 103 |
** prfw_pldl2keep: |
| 104 |
** prfw pldl2keep, p0, \[x0\] |
| 105 |
** ret |
| 106 |
*/ |
| 107 |
TEST_PREFETCH (prfw_pldl2keep, uint8_t, |
| 108 |
svprfw (p0, x0, SV_PLDL2KEEP), |
| 109 |
svprfw (p0, x0, SV_PLDL2KEEP)) |
| 110 |
|
| 111 |
/* |
| 112 |
** prfw_pldl2strm: |
| 113 |
** prfw pldl2strm, p0, \[x0\] |
| 114 |
** ret |
| 115 |
*/ |
| 116 |
TEST_PREFETCH (prfw_pldl2strm, uint8_t, |
| 117 |
svprfw (p0, x0, SV_PLDL2STRM), |
| 118 |
svprfw (p0, x0, SV_PLDL2STRM)) |
| 119 |
|
| 120 |
/* |
| 121 |
** prfw_pldl3keep: |
| 122 |
** prfw pldl3keep, p0, \[x0\] |
| 123 |
** ret |
| 124 |
*/ |
| 125 |
TEST_PREFETCH (prfw_pldl3keep, uint8_t, |
| 126 |
svprfw (p0, x0, SV_PLDL3KEEP), |
| 127 |
svprfw (p0, x0, SV_PLDL3KEEP)) |
| 128 |
|
| 129 |
/* |
| 130 |
** prfw_pldl3strm: |
| 131 |
** prfw pldl3strm, p0, \[x0\] |
| 132 |
** ret |
| 133 |
*/ |
| 134 |
TEST_PREFETCH (prfw_pldl3strm, uint8_t, |
| 135 |
svprfw (p0, x0, SV_PLDL3STRM), |
| 136 |
svprfw (p0, x0, SV_PLDL3STRM)) |
| 137 |
|
| 138 |
/* |
| 139 |
** prfw_pstl1keep: |
| 140 |
** prfw pstl1keep, p0, \[x0\] |
| 141 |
** ret |
| 142 |
*/ |
| 143 |
TEST_PREFETCH (prfw_pstl1keep, uint8_t, |
| 144 |
svprfw (p0, x0, SV_PSTL1KEEP), |
| 145 |
svprfw (p0, x0, SV_PSTL1KEEP)) |
| 146 |
|
| 147 |
/* |
| 148 |
** prfw_pstl1strm: |
| 149 |
** prfw pstl1strm, p0, \[x0\] |
| 150 |
** ret |
| 151 |
*/ |
| 152 |
TEST_PREFETCH (prfw_pstl1strm, uint8_t, |
| 153 |
svprfw (p0, x0, SV_PSTL1STRM), |
| 154 |
svprfw (p0, x0, SV_PSTL1STRM)) |
| 155 |
|
| 156 |
/* |
| 157 |
** prfw_pstl2keep: |
| 158 |
** prfw pstl2keep, p0, \[x0\] |
| 159 |
** ret |
| 160 |
*/ |
| 161 |
TEST_PREFETCH (prfw_pstl2keep, uint8_t, |
| 162 |
svprfw (p0, x0, SV_PSTL2KEEP), |
| 163 |
svprfw (p0, x0, SV_PSTL2KEEP)) |
| 164 |
|
| 165 |
/* |
| 166 |
** prfw_pstl2strm: |
| 167 |
** prfw pstl2strm, p0, \[x0\] |
| 168 |
** ret |
| 169 |
*/ |
| 170 |
TEST_PREFETCH (prfw_pstl2strm, uint8_t, |
| 171 |
svprfw (p0, x0, SV_PSTL2STRM), |
| 172 |
svprfw (p0, x0, SV_PSTL2STRM)) |
| 173 |
|
| 174 |
/* |
| 175 |
** prfw_pstl3keep: |
| 176 |
** prfw pstl3keep, p0, \[x0\] |
| 177 |
** ret |
| 178 |
*/ |
| 179 |
TEST_PREFETCH (prfw_pstl3keep, uint8_t, |
| 180 |
svprfw (p0, x0, SV_PSTL3KEEP), |
| 181 |
svprfw (p0, x0, SV_PSTL3KEEP)) |
| 182 |
|
| 183 |
/* |
| 184 |
** prfw_pstl3strm: |
| 185 |
** prfw pstl3strm, p0, \[x0\] |
| 186 |
** ret |
| 187 |
*/ |
| 188 |
TEST_PREFETCH (prfw_pstl3strm, uint8_t, |
| 189 |
svprfw (p0, x0, SV_PSTL3STRM), |
| 190 |
svprfw (p0, x0, SV_PSTL3STRM)) |
| 191 |
|
| 192 |
/* |
| 193 |
** prfw_vnum_0: |
| 194 |
** prfw pldl1keep, p0, \[x0\] |
| 195 |
** ret |
| 196 |
*/ |
| 197 |
TEST_PREFETCH (prfw_vnum_0, uint8_t, |
| 198 |
svprfw_vnum (p0, x0, 0, SV_PLDL1KEEP), |
| 199 |
svprfw_vnum (p0, x0, 0, SV_PLDL1KEEP)) |
| 200 |
|
| 201 |
/* |
| 202 |
** prfw_vnum_1: |
| 203 |
** prfw pldl1keep, p0, \[x0, #1, mul vl\] |
| 204 |
** ret |
| 205 |
*/ |
| 206 |
TEST_PREFETCH (prfw_vnum_1, uint16_t, |
| 207 |
svprfw_vnum (p0, x0, 1, SV_PLDL1KEEP), |
| 208 |
svprfw_vnum (p0, x0, 1, SV_PLDL1KEEP)) |
| 209 |
|
| 210 |
/* |
| 211 |
** prfw_vnum_31: |
| 212 |
** prfw pldl1keep, p0, \[x0, #31, mul vl\] |
| 213 |
** ret |
| 214 |
*/ |
| 215 |
TEST_PREFETCH (prfw_vnum_31, uint16_t, |
| 216 |
svprfw_vnum (p0, x0, 31, SV_PLDL1KEEP), |
| 217 |
svprfw_vnum (p0, x0, 31, SV_PLDL1KEEP)) |
| 218 |
|
| 219 |
/* |
| 220 |
** prfw_vnum_32: |
| 221 |
** cntb (x[0-9]+) |
| 222 |
** lsl (x[0-9]+), \1, #?5 |
| 223 |
** add (x[0-9]+), (\2, x0|x0, \2) |
| 224 |
** prfw pldl1keep, p0, \[\3\] |
| 225 |
** ret |
| 226 |
*/ |
| 227 |
TEST_PREFETCH (prfw_vnum_32, uint16_t, |
| 228 |
svprfw_vnum (p0, x0, 32, SV_PLDL1KEEP), |
| 229 |
svprfw_vnum (p0, x0, 32, SV_PLDL1KEEP)) |
| 230 |
|
| 231 |
/* |
| 232 |
** prfw_vnum_m32: |
| 233 |
** prfw pldl1keep, p0, \[x0, #-32, mul vl\] |
| 234 |
** ret |
| 235 |
*/ |
| 236 |
TEST_PREFETCH (prfw_vnum_m32, uint16_t, |
| 237 |
svprfw_vnum (p0, x0, -32, SV_PLDL1KEEP), |
| 238 |
svprfw_vnum (p0, x0, -32, SV_PLDL1KEEP)) |
| 239 |
|
| 240 |
/* |
| 241 |
** prfw_vnum_m33: |
| 242 |
** ... |
| 243 |
** prfw pldl1keep, p0, \[x[0-9]+\] |
| 244 |
** ret |
| 245 |
*/ |
| 246 |
TEST_PREFETCH (prfw_vnum_m33, uint16_t, |
| 247 |
svprfw_vnum (p0, x0, -33, SV_PLDL1KEEP), |
| 248 |
svprfw_vnum (p0, x0, -33, SV_PLDL1KEEP)) |
| 249 |
|
| 250 |
/* |
| 251 |
** prfw_vnum_x1: |
| 252 |
** cntb (x[0-9]+) |
| 253 |
** ( |
| 254 |
** madd (x[0-9]+), (?:x1, \1|\1, x1), x0 |
| 255 |
** prfw pldl1keep, p0, \[\2\] |
| 256 |
** | |
| 257 |
** mul (x[0-9]+), (?:x1, \1|\1, x1) |
| 258 |
** prfw zldl1keep, p0, \[x0, \3\] |
| 259 |
** ) |
| 260 |
** ret |
| 261 |
*/ |
| 262 |
TEST_PREFETCH (prfw_vnum_x1, uint64_t, |
| 263 |
svprfw_vnum (p0, x0, x1, SV_PLDL1KEEP), |
| 264 |
svprfw_vnum (p0, x0, x1, SV_PLDL1KEEP)) |