From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzUsR-00086y-Cw for qemu-devel@nongnu.org; Mon, 01 Jun 2015 14:56:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzUsK-0008V6-T7 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 14:55:59 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:34803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzUsK-0008V2-Nn for qemu-devel@nongnu.org; Mon, 01 Jun 2015 14:55:52 -0400 Received: by qcej9 with SMTP id j9so8197945qce.1 for ; Mon, 01 Jun 2015 11:55:52 -0700 (PDT) Sender: Richard Henderson Message-ID: <556CAAB3.2080509@twiddle.net> Date: Mon, 01 Jun 2015 11:55:47 -0700 From: Richard Henderson MIME-Version: 1.0 References: <3b40190715e7e7e0bfaa7d9c77a846745712c303.1433052532.git.crosthwaite.peter@gmail.com> In-Reply-To: <3b40190715e7e7e0bfaa7d9c77a846745712c303.1433052532.git.crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 19/34] HACK: disas: Defeature print_target_address List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: edgar.iglesias@gmail.com, Peter Crosthwaite , pbonzini@redhat.com, afaerber@suse.de, peter.maydell@linaro.org 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. r~