diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-01-01 23:58:20 -0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-01-08 19:07:21 +0000 |
commit | afb2530fe328079b3e4355fda9751a1dd9ef6ffb (patch) | |
tree | 5c91d15cef715beae081ecfe3be2e9d0006f6421 | |
parent | a4f0cec6c9da10c5998fdd53845baf2ce6105830 (diff) | |
download | hqemu-afb2530fe328079b3e4355fda9751a1dd9ef6ffb.zip hqemu-afb2530fe328079b3e4355fda9751a1dd9ef6ffb.tar.gz |
target-arm: remove raw_read|write duplication
There is an inline duplication of the raw_read and raw_write function
bodies. Fix by just calling raw_read/raw_write instead.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: e69281b7e1462b346cb313cf0b89eedc0568125f.1388649290.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target-arm/helper.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index be52c1f..6f629f3 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -142,11 +142,7 @@ static bool read_raw_cp_reg(CPUARMState *env, const ARMCPRegInfo *ri, } else if (ri->readfn) { return (ri->readfn(env, ri, v) == 0); } else { - if (ri->type & ARM_CP_64BIT) { - *v = CPREG_FIELD64(env, ri); - } else { - *v = CPREG_FIELD32(env, ri); - } + raw_read(env, ri, v); } return true; } @@ -167,11 +163,7 @@ static bool write_raw_cp_reg(CPUARMState *env, const ARMCPRegInfo *ri, } else if (ri->writefn) { return (ri->writefn(env, ri, v) == 0); } else { - if (ri->type & ARM_CP_64BIT) { - CPREG_FIELD64(env, ri) = v; - } else { - CPREG_FIELD32(env, ri) = v; - } + raw_write(env, ri, v); } return true; } |