diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-20 10:35:54 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-20 10:35:54 +0000 |
commit | c4241c7d381086819131fba4fc8123848d83de8a (patch) | |
tree | 600f4defa56d7b98fef22f3bd3b56827e495ce73 /target-arm/op_helper.c | |
parent | 92611c0019c38c860e6926dd2073c4448c382859 (diff) | |
download | qemu-c4241c7d381086819131fba4fc8123848d83de8a.zip qemu-c4241c7d381086819131fba4fc8123848d83de8a.tar.gz qemu-c4241c7d381086819131fba4fc8123848d83de8a.tar.bz2 |
target-arm: Drop success/fail return from cpreg read and write functions
All cpreg read and write functions now return 0, so we can clean up
their prototypes:
* write functions return void
* read functions return the value rather than taking a pointer
to write the value to
This is a fairly mechanical change which makes only the bare
minimum set of changes to the callers of read and write functions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Diffstat (limited to 'target-arm/op_helper.c')
-rw-r--r-- | target-arm/op_helper.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 34c5e7f..eb0fccd 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -294,41 +294,29 @@ void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip) void HELPER(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value) { const ARMCPRegInfo *ri = rip; - int excp = ri->writefn(env, ri, value); - if (excp) { - raise_exception(env, excp); - } + + ri->writefn(env, ri, value); } uint32_t HELPER(get_cp_reg)(CPUARMState *env, void *rip) { const ARMCPRegInfo *ri = rip; - uint64_t value; - int excp = ri->readfn(env, ri, &value); - if (excp) { - raise_exception(env, excp); - } - return value; + + return ri->readfn(env, ri); } void HELPER(set_cp_reg64)(CPUARMState *env, void *rip, uint64_t value) { const ARMCPRegInfo *ri = rip; - int excp = ri->writefn(env, ri, value); - if (excp) { - raise_exception(env, excp); - } + + ri->writefn(env, ri, value); } uint64_t HELPER(get_cp_reg64)(CPUARMState *env, void *rip) { const ARMCPRegInfo *ri = rip; - uint64_t value; - int excp = ri->readfn(env, ri, &value); - if (excp) { - raise_exception(env, excp); - } - return value; + + return ri->readfn(env, ri); } /* ??? Flag setting arithmetic is awkward because we need to do comparisons. |