Revision 8aa3fa20 target-alpha/translate.c

b/target-alpha/translate.c
74 74

  
75 75
    /* We are exiting the TB, but have neither emitted a goto_tb, nor
76 76
       updated the PC for the next instruction to be executed.  */
77
    EXIT_PC_STALE
77
    EXIT_PC_STALE,
78

  
79
    /* We are ending the TB with a noreturn function call, e.g. longjmp.
80
       No following code will be executed.  */
81
    EXIT_NORETURN,
78 82
} ExitStatus;
79 83

  
80 84
/* global register indexes */
......
134 138
    done_init = 1;
135 139
}
136 140

  
137
static inline void gen_excp(DisasContext *ctx, int exception, int error_code)
141
static ExitStatus gen_excp(DisasContext *ctx, int exception, int error_code)
138 142
{
139 143
    TCGv_i32 tmp1, tmp2;
140 144

  
......
144 148
    gen_helper_excp(tmp1, tmp2);
145 149
    tcg_temp_free_i32(tmp2);
146 150
    tcg_temp_free_i32(tmp1);
151

  
152
    return EXIT_NORETURN;
147 153
}
148 154

  
149
static inline void gen_invalid(DisasContext *ctx)
155
static inline ExitStatus gen_invalid(DisasContext *ctx)
150 156
{
151
    gen_excp(ctx, EXCP_OPCDEC, 0);
157
    return gen_excp(ctx, EXCP_OPCDEC, 0);
152 158
}
153 159

  
154 160
static inline void gen_qemu_ldf(TCGv t0, TCGv t1, int flags)
......
1457 1463
#endif
1458 1464
        if (palcode >= 0x80 && palcode < 0xC0) {
1459 1465
            /* Unprivileged PAL call */
1460
            gen_excp(ctx, EXCP_CALL_PAL + ((palcode & 0x3F) << 6), 0);
1461
            /* PC updated by gen_excp.  */
1462
            ret = EXIT_PC_UPDATED;
1466
            ret = gen_excp(ctx, EXCP_CALL_PAL + ((palcode & 0x3F) << 6), 0);
1463 1467
            break;
1464 1468
        }
1465 1469
#ifndef CONFIG_USER_ONLY
......
1467 1471
            /* Privileged PAL code */
1468 1472
            if (ctx->mem_idx & 1)
1469 1473
                goto invalid_opc;
1470
            gen_excp(ctx, EXCP_CALL_PALP + ((palcode & 0x3F) << 6), 0);
1474
            ret = gen_excp(ctx, EXCP_CALL_PALP + ((palcode & 0x3F) << 6), 0);
1471 1475
        }
1472 1476
#endif
1473 1477
        /* Invalid PAL call */
......
3075 3079
        ret = gen_bcond(ctx, TCG_COND_GT, ra, disp21, 0);
3076 3080
        break;
3077 3081
    invalid_opc:
3078
        gen_invalid(ctx);
3079
        /* PC updated by gen_excp.  */
3080
        ret = EXIT_PC_UPDATED;
3082
        ret = gen_invalid(ctx);
3081 3083
        break;
3082 3084
    }
3083 3085

  
......
3181 3183

  
3182 3184
    switch (ret) {
3183 3185
    case EXIT_GOTO_TB:
3186
    case EXIT_NORETURN:
3184 3187
        break;
3185 3188
    case EXIT_PC_STALE:
3186 3189
        tcg_gen_movi_i64(cpu_pc, ctx.pc);

Also available in: Unified diff