[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 19/34] HACK: disas: Defeature print_target_addr
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC v2 19/34] HACK: disas: Defeature print_target_address |
Date: |
Sun, 7 Jun 2015 17:21:30 -0700 |
On Mon, Jun 1, 2015 at 11:55 AM, Richard Henderson <address@hidden> wrote:
> On 05/30/2015 11:11 PM, Peter Crosthwaite wrote:
>> -/* Print address in hex, truncated to the width of a target virtual
>> address. */
>> -static void
>> -generic_print_target_address(bfd_vma addr, struct disassemble_info *info)
>> -{
>> - uint64_t mask = ~0ULL >> (64 - TARGET_VIRT_ADDR_SPACE_BITS);
>> - generic_print_address(addr & mask, info);
>> -}
>> -
>
> IMO, we could just drop the masking.
>
> I don't know of any target which doesn't at least sanity check the high bits
> of
> an address before looking up the virtual address in the page tables.
>
> So again, I don't think this is a hack at all, just cleaning up cruft.
>
Ok. I have edited to commit message and kept the patch as-is.
Regards,
Peter
>
> r~
>