[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 25/26] target/alpha: Implement WTINT inline
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v7 25/26] target/alpha: Implement WTINT inline |
Date: |
Fri, 26 May 2017 14:16:37 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/alpha/translate.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index df5d695..4523c4c 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -1157,6 +1157,7 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int
palcode)
#ifndef CONFIG_USER_ONLY
/* Privileged PAL code */
if (palcode < 0x40 && (ctx->tb->flags & TB_FLAGS_USER_MODE) == 0) {
+ TCGv tmp;
switch (palcode) {
case 0x01:
/* CFLUSH */
@@ -1182,10 +1183,8 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int
palcode)
offsetof(CPUAlphaState, sysval));
break;
- case 0x35: {
+ case 0x35:
/* SWPIPL */
- TCGv tmp;
-
/* Note that we already know we're in kernel mode, so we know
that PS only contains the 3 IPL bits. */
tcg_gen_ld8u_i64(ctx->ir[IR_V0], cpu_env,
@@ -1197,7 +1196,6 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int
palcode)
tcg_gen_st8_i64(tmp, cpu_env, offsetof(CPUAlphaState, ps));
tcg_temp_free(tmp);
break;
- }
case 0x36:
/* RDPS */
@@ -1220,6 +1218,14 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int
palcode)
-offsetof(AlphaCPU, env) + offsetof(CPUState, cpu_index));
break;
+ case 0x3E:
+ /* WTINT */
+ tmp = tcg_const_i64(1);
+ tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) +
+ offsetof(CPUState, halted));
+ tcg_gen_movi_i64(ctx->ir[IR_V0], 0);
+ return gen_excp(ctx, EXCP_HALTED, 0);
+
default:
palcode &= 0x3f;
goto do_call_pal;
@@ -1369,7 +1375,7 @@ static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb,
int regno)
tmp = tcg_const_i64(1);
tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) +
offsetof(CPUState, halted));
- return gen_excp(ctx, EXCP_HLT, 0);
+ return gen_excp(ctx, EXCP_HALTED, 0);
case 252:
/* HALT */
--
2.9.4
- [Qemu-devel] [PATCH v7 14/26] tcg/sparc: Implement goto_ptr, (continued)
- [Qemu-devel] [PATCH v7 14/26] tcg/sparc: Implement goto_ptr, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 13/26] tcg/aarch64: Implement goto_ptr, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 17/26] tcg/arm: Implement goto_ptr, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 16/26] tcg/arm: Clarify tcg_out_bx for arm4 host, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 20/26] target/hppa: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 21/26] target/aarch64: optimize cross-page direct jumps in softmmu, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 22/26] target/aarch64: optimize indirect branches, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 23/26] target/mips: optimize cross-page direct jumps in softmmu, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 24/26] target/mips: optimize indirect branches, Richard Henderson, 2017/05/26
- [Qemu-devel] [PATCH v7 25/26] target/alpha: Implement WTINT inline,
Richard Henderson <=
- [Qemu-devel] [PATCH v7 26/26] target/alpha: Use goto_tb for fallthru between TBs, Richard Henderson, 2017/05/26