On 09/26/2013 05:48 PM, Alexander Graf wrote:
> +static void handle_br(DisasContext *s, uint32_t insn)
> +{
> + int branch_type = get_bits(insn, 21, 2);
> + int source = get_bits(insn, 5, 5);
> +
> + switch (branch_type) {
> + case 0: /* JMP */
> + break;
> + case 1: /* CALL */
> + tcg_gen_movi_i64(cpu_reg(30), s->pc);
> + break;
> + case 2: /* RET */
> + source = 30;
> + break;
This is incorrect. One can RET from any register; the only difference between
JMP and RET is a branch prediction hint irrelevant to QEMU.
r~