[PATCH v2 4/4] hw/nios2: exit to main CPU loop only when unmasking interrupts

2020-07-10 Thread Wentong Wu
Only when guest code is unmasking interrupts, terminate the excution of translated code and exit to the main CPU loop to handle previous pended interrupts because of the interrupts mask by guest code. Signed-off-by: Wentong Wu --- hw/nios2/cpu_pic.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 3/4] target/nios2: Use gen_io_start around wrctl instruction

2020-07-10 Thread Wentong Wu
UPDATE. Signed-off-by: Wentong Wu --- target/nios2/translate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 83c10eb2..51347ada 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -32,6 +32,7 @@ #include &

[PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate

2020-07-10 Thread Wentong Wu
Add DISAS_NORETURN case for nothing more to generate because at runtime execution will never return from some helper call. And at the same time replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception with the newly added DISAS_NORETURN. Signed-off-by: Wentong Wu --- target/nios2

[PATCH v2 2/4] target/nios2: in line the semantics of DISAS_UPDATE with other targets

2020-07-10 Thread Wentong Wu
In line the semantics of DISAS_UPDATE on nios2 target with other targets which is to explicitly write the PC back into the cpu state before doing a tcg_gen_exit_tb(). Signed-off-by: Wentong Wu --- target/nios2/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 3/3] target/nios2: Use gen_io_start around wrctl instruction

2020-06-29 Thread Wentong Wu
UPDATE. Signed-off-by: Wentong Wu --- target/nios2/translate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 83c10eb2..51347ada 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -32,6 +32,7 @@ #include &

[PATCH 1/3] target/nios2: add DISAS_NORETURN case for nothing more to generate

2020-06-29 Thread Wentong Wu
Add DISAS_NORETURN case for nothing more to generate because at runtime execution will never return from some helper call. And at the same time replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception with the newly added DISAS_NORETURN. Signed-off-by: Wentong Wu --- target/nios2

[PATCH 2/3] target/nios2: in line the semantics of DISAS_UPDATE with other targets

2020-06-29 Thread Wentong Wu
In line the semantics of DISAS_UPDATE on nios2 target with other targets which is to explicitly write the PC back into the cpu state before doing a tcg_gen_exit_tb(). Signed-off-by: Wentong Wu --- target/nios2/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a