[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] target/arm: MTE user mode disassembly
From: |
Richard Henderson |
Subject: |
Re: [PATCH 2/5] target/arm: MTE user mode disassembly |
Date: |
Fri, 13 Mar 2020 07:54:21 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 3/13/20 7:00 AM, Rémi Denis-Courmont wrote:
> +/* Extract an Allocation Tag from an address */
> +static void gen_extract_tag(TCGv_i64 dest, TCGv_i64 source)
> +{
> + TCGv_i64 sign = tcg_temp_new_i64();
> +
> + /* See ARMv8.5-A AllocationTagFromAddress pseudocode */
> + tcg_gen_extract_i64(sign, source, 55, 1);
> + tcg_gen_extract_i64(dest, source, 56, 4);
> + tcg_gen_add_i64(dest, dest, sign);
> + tcg_gen_andi_i64(dest, dest, 0xf);
> + tcg_temp_free_i64(sign);
> +}
In addition to everything else, I see that you're working from quite an old
beta version of the memtag spec.
Please grab the most recent Arm ARM, F.a:
https://developer.arm.com/docs/ddi0487/latest
The current version does not really distinguish between logical and physical
tags, so there is no add:
bits(4) AArch64.AllocationTagFromAddress(bits(64) tagged_address)
return tagged_address<59:56>;
r~