Skip to content

Commit 6ac3abc

Browse files
committed
Revert "arch-riscv: fix agnostic vector load fill"
This reverts commit 40bf365.
1 parent 446710f commit 6ac3abc

2 files changed

Lines changed: 0 additions & 56 deletions

File tree

src/arch/riscv/isa/vector/base/vector_mem.temp.isa

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
output header {{
22

3-
#define FILL_AGNOSTIC_ELEM(Vd_bytes, elem_idx, eewb_) \
4-
std::fill_n((Vd_bytes) + (elem_idx) * (eewb_), (eewb_), 0xff)
5-
6-
#define APPLY_VLOAD_AGNOSTIC(Vd_bytes, elem_num_per_vreg_, eewb_) \
7-
do { \
8-
for (size_t _i = 0; _i < vmi.re - vmi.rs; ++_i) { \
9-
const uint32_t _vdElemIdx = \
10-
(vmi.rs % (elem_num_per_vreg_)) + _i; \
11-
const size_t _ei = _i + vmi.rs; \
12-
const bool _is_tail = _ei >= rVl; \
13-
const bool _is_masked = !this->vm && !_is_tail && \
14-
!elem_mask(v0, _ei); \
15-
if ((_is_tail && machInst.vtype8.vta) || \
16-
(_is_masked && machInst.vtype8.vma)) { \
17-
FILL_AGNOSTIC_ELEM((Vd_bytes), _vdElemIdx, (eewb_)); \
18-
} \
19-
} \
20-
} while (0)
21-
223
inline uint32_t
234
calc_memsize(uint32_t rs, uint32_t re, uint32_t sew, uint32_t rVl) {
245
uint32_t vend = std::min(rVl, re);
@@ -166,7 +147,6 @@ Fault
166147
{
167148
%(op_decl)s;
168149
%(op_rd)s;
169-
auto VdBytes = tmp_d0.as<uint8_t>();
170150

171151
Addr EA;
172152
// EA = Rs1 + vmi.offset;
@@ -192,8 +172,6 @@ Fault
192172
%(memacc_code)s;
193173
}
194174

195-
APPLY_VLOAD_AGNOSTIC(VdBytes, elem_num_per_vreg, eew / 8);
196-
197175
%(op_wb)s;
198176
return fault;
199177
}
@@ -283,7 +261,6 @@ Fault
283261

284262
%(op_decl)s;
285263
%(op_rd)s;
286-
auto VdBytes = tmp_d0.as<uint8_t>();
287264

288265
#if %(is_vecWhole)s
289266
// VM_REQUIRED();
@@ -322,11 +299,6 @@ Fault
322299
}
323300
}
324301

325-
#if %(is_vecWhole)s
326-
#else
327-
APPLY_VLOAD_AGNOSTIC(VdBytes, elem_num_per_vreg, eewb);
328-
#endif
329-
330302
%(vfof_get_code)s;
331303
%(op_wb)s;
332304
return NoFault;

src/arch/riscv/isa/vector/simple/vector_mem.temp.isa

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
output header {{
22

3-
#define FILL_AGNOSTIC_ELEM(Vd_bytes, elem_idx, eewb_) \
4-
std::fill_n((Vd_bytes) + (elem_idx) * (eewb_), (eewb_), 0xff)
5-
6-
#define APPLY_VLOAD_AGNOSTIC(Vd_bytes, elem_num_per_vreg_, eewb_) \
7-
do { \
8-
for (size_t _i = 0; _i < vmi.re - vmi.rs; ++_i) { \
9-
const uint32_t _vdElemIdx = \
10-
(vmi.rs % (elem_num_per_vreg_)) + _i; \
11-
const size_t _ei = _i + vmi.rs; \
12-
const bool _is_tail = _ei >= rVl; \
13-
const bool _is_masked = !this->vm && !_is_tail && \
14-
!elem_mask(v0, _ei); \
15-
if ((_is_tail && machInst.vtype8.vta) || \
16-
(_is_masked && machInst.vtype8.vma)) { \
17-
FILL_AGNOSTIC_ELEM((Vd_bytes), _vdElemIdx, (eewb_)); \
18-
} \
19-
} \
20-
} while (0)
21-
223
inline uint32_t
234
calc_memsize(uint32_t rs, uint32_t re, uint32_t sew, uint32_t rVl) {
245
uint32_t vend = std::min(rVl, re);
@@ -166,7 +147,6 @@ Fault
166147
{
167148
%(op_decl)s;
168149
%(op_rd)s;
169-
auto VdBytes = tmp_d0.as<uint8_t>();
170150

171151
Addr EA;
172152
// EA = Rs1 + vmi.offset;
@@ -192,8 +172,6 @@ Fault
192172
%(memacc_code)s;
193173
}
194174

195-
APPLY_VLOAD_AGNOSTIC(VdBytes, elem_num_per_vreg, eew / 8);
196-
197175
%(op_wb)s;
198176
return fault;
199177
}
@@ -283,7 +261,6 @@ Fault
283261

284262
%(op_decl)s;
285263
%(op_rd)s;
286-
auto VdBytes = tmp_d0.as<uint8_t>();
287264

288265
#if %(is_vecWhole)s
289266
// VM_REQUIRED();
@@ -322,11 +299,6 @@ Fault
322299
}
323300
}
324301

325-
#if %(is_vecWhole)s
326-
#else
327-
APPLY_VLOAD_AGNOSTIC(VdBytes, elem_num_per_vreg, eewb);
328-
#endif
329-
330302
%(vfof_get_code)s;
331303
%(op_wb)s;
332304
return NoFault;

0 commit comments

Comments
 (0)