qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/60] AArch64: Add handling for br instructions


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 10/60] AArch64: Add handling for br instructions
Date: Fri, 27 Sep 2013 07:51:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]