diff options
author | Xiaojuan Yang <yangxiaojuan@loongson.cn> | 2022-06-06 20:43:15 +0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-06 18:09:03 +0000 |
commit | 5b1dedfe848b61521aa5b46b81a4cc676e9e7c1b (patch) | |
tree | 5e119c1e5637aa79bb852e765ccd4e93271bfdb3 /target/loongarch/helper.h | |
parent | dd615fa48da89b2308a907cc4e4956771c75d68f (diff) | |
download | qemu-5b1dedfe848b61521aa5b46b81a4cc676e9e7c1b.zip qemu-5b1dedfe848b61521aa5b46b81a4cc676e9e7c1b.tar.gz qemu-5b1dedfe848b61521aa5b46b81a4cc676e9e7c1b.tar.bz2 |
target/loongarch: Add LoongArch CSR instruction
This includes:
- CSRRD
- CSRWR
- CSRXCHG
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220606124333.2060567-26-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/loongarch/helper.h')
-rw-r--r-- | target/loongarch/helper.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/loongarch/helper.h b/target/loongarch/helper.h index da1a2bc..5a6754e 100644 --- a/target/loongarch/helper.h +++ b/target/loongarch/helper.h @@ -92,3 +92,11 @@ DEF_HELPER_2(frint_s, i64, env, i64) DEF_HELPER_2(frint_d, i64, env, i64) DEF_HELPER_FLAGS_2(set_rounding_mode, TCG_CALL_NO_RWG, void, env, i32) + +/* CSRs helper */ +DEF_HELPER_1(csrrd_pgd, i64, env) +DEF_HELPER_1(csrrd_tval, i64, env) +DEF_HELPER_2(csrwr_estat, i64, env, tl) +DEF_HELPER_2(csrwr_asid, i64, env, tl) +DEF_HELPER_2(csrwr_tcfg, i64, env, tl) +DEF_HELPER_2(csrwr_ticlr, i64, env, tl) |