aboutsummaryrefslogtreecommitdiff
path: root/reginfo.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-06-22 15:12:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-07-02 13:08:21 +0100
commit576fc6e1dfbc46c191168bba5fa32b6310c548ea (patch)
tree4c87d4e8eb91a5931431fde18824f52f0173ef5a /reginfo.c
parent44c6937c23ef60dd70b799024da41f2694ff715e (diff)
risu_reginfo: introduce reginfo_size()
In preparation for conditionally supporting SVE we need to be able to have different sized reginfos. This introduces reginfo_size() to abstract the size away to the code the actually knows. For aarch64 we also use this while initialising the block. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180622141205.16306-18-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'reginfo.c')
-rw-r--r--reginfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/reginfo.c b/reginfo.c
index 1f55d06..dd42ae2 100644
--- a/reginfo.c
+++ b/reginfo.c
@@ -39,7 +39,7 @@ int send_register_info(write_fn write_fn, void *uc)
switch (op) {
case OP_TESTEND:
- write_fn(&ri, sizeof(ri));
+ write_fn(&ri, reginfo_size());
/* if we are tracing write_fn will return 0 unlike a remote
end, hence we force return of 1 here */
return 1;
@@ -58,7 +58,7 @@ int send_register_info(write_fn write_fn, void *uc)
/* Do a simple register compare on (a) explicit request
* (b) end of test (c) a non-risuop UNDEF
*/
- return write_fn(&ri, sizeof(ri));
+ return write_fn(&ri, reginfo_size());
}
return 0;
}
@@ -101,7 +101,7 @@ int recv_and_compare_register_info(read_fn read_fn,
/* Do a simple register compare on (a) explicit request
* (b) end of test (c) a non-risuop UNDEF
*/
- if (read_fn(&apprentice_ri, sizeof(apprentice_ri))) {
+ if (read_fn(&apprentice_ri, reginfo_size())) {
packet_mismatch = 1;
resp = 2;
} else if (!reginfo_is_eq(&master_ri, &apprentice_ri)) {