qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 04/18] tcg/aarch64: Implement field extractio


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 04/18] tcg/aarch64: Implement field extraction opcodes
Date: Tue, 18 Oct 2016 09:11:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/18/2016 08:33 AM, Claudio Fontana wrote:
> +    case INDEX_op_extract_i64:
> +    case INDEX_op_extract_i32:
> +        tcg_out_ubfm(s, ext, a0, a1, a2, a2 + args[3] - 1);
> +        break;
> +
> +    case INDEX_op_sextract_i64:
> +    case INDEX_op_sextract_i32:
> +        tcg_out_sbfm(s, ext, a0, a1, a2, a2 + args[3] - 1);
> +        break;
> +
ah, probably missing something obvious.. not args[3]?

No, the r and s fields encode lsb and msb of the field.

I had the same wrong memory of the encoding; which is fair considering the aarch32 instruction *does* use lsb and size-1.

The failure was quite obvious even in the disassembly once I actually got a machine checked out to test it.


r~



reply via email to

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