diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2018-06-22 15:12:00 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-02 13:08:21 +0100 |
commit | 576fc6e1dfbc46c191168bba5fa32b6310c548ea (patch) | |
tree | 4c87d4e8eb91a5931431fde18824f52f0173ef5a /reginfo.c | |
parent | 44c6937c23ef60dd70b799024da41f2694ff715e (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)) { |