diff options
author | Peter Maydell <pmaydell@chiark.greenend.org.uk> | 2017-02-24 17:02:25 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-24 17:02:58 +0000 |
commit | 3a649bfebac5550e9bab99986eac3962ede2da96 (patch) | |
tree | 7055d08509cc43bf701f665f529601b95fcb3152 /risu.h | |
parent | c7fe9c70b2f7dd3cb48857edd40f67a0ad162db5 (diff) |
Abstract out getting and setting parameter register
The SETMEMBLOCK operation takes a parameter in a register,
and GETMEMBLOCK returns a result in a register. Abstract
these out into functions provided by the backend, so we
can use common code for send_register_info() and
recv_and_compare_register_info().
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
Diffstat (limited to 'risu.h')
-rw-r--r-- | risu.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -37,6 +37,8 @@ extern int test_fp_exc; /* The memory block should be this long */ #define MEMBLOCKLEN 8192 +struct reginfo; + /* Interface provided by CPU-specific code: */ /* Send the register information from the struct ucontext down the socket. @@ -63,4 +65,13 @@ int report_match_status(void); */ void advance_pc(void *uc); +/* Set the parameter register in a ucontext_t to the specified value. + * (32-bit targets can ignore high 32 bits.) + * vuc is a ucontext_t* cast to void*. + */ +void set_ucontext_paramreg(void *vuc, uint64_t value); + +/* Return the value of the parameter register from a reginfo. */ +uint64_t get_reginfo_paramreg(struct reginfo *ri); + #endif /* RISU_H */ |