@@ -64,7 +64,7 @@ void reginfo_init(struct reginfo *ri, ucontext_t *uc)
ri->fpcr = fp->fpcr;
for (i = 0; i < 32; i++) {
- ri->vregs[i] = fp->vregs[i];
+ ri->simd.vregs[i] = fp->vregs[i];
}
}
@@ -92,8 +92,8 @@ int reginfo_dump(struct reginfo *ri, FILE * f)
for (i = 0; i < 32; i++) {
fprintf(f, " V%2d : %016" PRIx64 "%016" PRIx64 "\n", i,
- (uint64_t) (ri->vregs[i] >> 64),
- (uint64_t) (ri->vregs[i] & 0xffffffffffffffff));
+ (uint64_t) (ri->simd.vregs[i] >> 64),
+ (uint64_t) (ri->simd.vregs[i] & 0xffffffffffffffff));
}
return !ferror(f);
@@ -138,14 +138,14 @@ int reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE * f)
}
for (i = 0; i < 32; i++) {
- if (m->vregs[i] != a->vregs[i]) {
+ if (m->simd.vregs[i] != a->simd.vregs[i]) {
fprintf(f, " V%2d : "
"%016" PRIx64 "%016" PRIx64 " vs "
"%016" PRIx64 "%016" PRIx64 "\n", i,
- (uint64_t) (m->vregs[i] >> 64),
- (uint64_t) (m->vregs[i] & 0xffffffffffffffff),
- (uint64_t) (a->vregs[i] >> 64),
- (uint64_t) (a->vregs[i] & 0xffffffffffffffff));
+ (uint64_t) (m->simd.vregs[i] >> 64),
+ (uint64_t) (m->simd.vregs[i] & 0xffffffffffffffff),
+ (uint64_t) (a->simd.vregs[i] >> 64),
+ (uint64_t) (a->simd.vregs[i] & 0xffffffffffffffff));
}
}
@@ -13,6 +13,10 @@
#ifndef RISU_REGINFO_AARCH64_H
#define RISU_REGINFO_AARCH64_H
+struct simd_reginfo {
+ __uint128_t vregs[32];
+};
+
struct reginfo {
uint64_t fault_address;
uint64_t regs[31];
@@ -24,7 +28,10 @@ struct reginfo {
/* FP/SIMD */
uint32_t fpsr;
uint32_t fpcr;
- __uint128_t vregs[32];
+
+ union {
+ struct simd_reginfo simd;
+ };
};
#endif /* RISU_REGINFO_AARCH64_H */
This is preparation for the SVE work as we won't want to be carrying around both VFP and SVE registers at the same time as they overlap. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- risu_reginfo_aarch64.c | 16 ++++++++-------- risu_reginfo_aarch64.h | 9 ++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) -- 2.17.1