diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2011-11-26 15:48:41 +0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-01-16 19:19:03 -0800 |
commit | 3a3c9dc4ca2eaa612cbd5d4c85d674b15eadfb02 (patch) | |
tree | d64a088bd5188f6b19fe1fcd341283140f5fcc0e /target/xtensa/op_helper.c | |
parent | 8b912ff033cbc2e58476dfdc00fa2b8529c9eb96 (diff) |
target-xtensa: implement RER/WER instructions
RER and WER are privileged instructions for accessing external
registers. External register address space is local to processor core.
There's no alignment requirements, addressable units are 32-bit wide
registers.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/op_helper.c')
-rw-r--r-- | target/xtensa/op_helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c index 989578a811..b456c2ec3f 100644 --- a/target/xtensa/op_helper.c +++ b/target/xtensa/op_helper.c @@ -1027,3 +1027,15 @@ void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b) int v = float32_compare_quiet(a, b, &env->fp_status); set_br(env, v != float_relation_greater, br); } + +uint32_t HELPER(rer)(CPUXtensaState *env, uint32_t addr) +{ + return address_space_ldl(env->address_space_er, addr, + (MemTxAttrs){0}, NULL); +} + +void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr) +{ + address_space_stl(env->address_space_er, addr, data, + (MemTxAttrs){0}, NULL); +} |