On 02/17/2018 05:32 PM, Emilio G. Cota wrote:
> Signed-off-by: Emilio G. Cota <c...@braap.org>
> ---
>  target/openrisc/translate.c | 87 
> ++++++++++++++++++++++-----------------------
>  1 file changed, 43 insertions(+), 44 deletions(-)
> 
> diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
> index 2747b24..0450144 100644
> --- a/target/openrisc/translate.c
> +++ b/target/openrisc/translate.c
> @@ -36,7 +36,8 @@
>  #include "exec/log.h"
>  
>  #define LOG_DIS(str, ...) \
> -    qemu_log_mask(CPU_LOG_TB_IN_ASM, "%08x: " str, dc->pc, ## __VA_ARGS__)
> +    qemu_log_mask(CPU_LOG_TB_IN_ASM, "%08x: " str, dc->base.pc_next,    \
> +                  ## __VA_ARGS__)
>  
>  /* is_jmp field values */
>  #define DISAS_JUMP    DISAS_TARGET_0 /* only pc was modified dynamically */
> @@ -44,13 +45,10 @@
>  #define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */
>  
>  typedef struct DisasContext {
> -    TranslationBlock *tb;
> -    target_ulong pc;
> -    uint32_t is_jmp;
> +    DisasContextBase base;
>      uint32_t mem_idx;
>      uint32_t tb_flags;
>      uint32_t delayed_branch;
> -    bool singlestep_enabled;
>  } DisasContext;
>  
>  static TCGv cpu_sr;
> @@ -126,9 +124,9 @@ static void gen_exception(DisasContext *dc, unsigned int 
> excp)
>  
>  static void gen_illegal_exception(DisasContext *dc)
>  {
> -    tcg_gen_movi_tl(cpu_pc, dc->pc);
> +    tcg_gen_movi_tl(cpu_pc, dc->base.pc_next);
>      gen_exception(dc, EXCP_ILLEGAL);
> -    dc->is_jmp = DISAS_UPDATE;
> +    dc->base.is_jmp = DISAS_UPDATE;

Should be NORETURN.

> @@ -1254,14 +1252,14 @@ static void dec_sys(DisasContext *dc, uint32_t insn)
>      switch (op0) {
>      case 0x000:    /* l.sys */
>          LOG_DIS("l.sys %d\n", K16);
> -        tcg_gen_movi_tl(cpu_pc, dc->pc);
> +        tcg_gen_movi_tl(cpu_pc, dc->base.pc_next);
>          gen_exception(dc, EXCP_SYSCALL);
> -        dc->is_jmp = DISAS_UPDATE;
> +        dc->base.is_jmp = DISAS_UPDATE;

Likewise.


r~

Reply via email to