From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8thx-0006Xv-18 for qemu-devel@nongnu.org; Tue, 26 May 2009 06:16:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8ths-0006WY-41 for qemu-devel@nongnu.org; Tue, 26 May 2009 06:16:32 -0400 Received: from [199.232.76.173] (port=36233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8thr-0006WL-Pw for qemu-devel@nongnu.org; Tue, 26 May 2009 06:16:27 -0400 Received: from mx20.gnu.org ([199.232.41.8]:9889) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8thr-0001Aw-GQ for qemu-devel@nongnu.org; Tue, 26 May 2009 06:16:27 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8thp-00009o-OU for qemu-devel@nongnu.org; Tue, 26 May 2009 06:16:26 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 1/16] ARM Add ARM 920T identifiers Date: Tue, 26 May 2009 11:16:18 +0100 References: <20090423171503.GC4629@derik> <761ea48b0905260242v4290a835rd8b958c7544e667c@mail.gmail.com> <20090526095652.GA32352@shareable.org> In-Reply-To: <20090526095652.GA32352@shareable.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905261116.19478.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Desnogues , Vincent Sanders > > It could be a major problem if you start playing with ARM/Thumb > > interworking. > > I'm curious. How would code built for ARMv4T interworking fail on an > ARMv5T emulator? Usually the reverse is true - code works on v5, but fails on v4t. However the following will work on armv4t and fail on armv5: test: adr r0, 1f orr r0, r0, #1 str r0, [sp, #-4]! ldr pc, [sp], #4 1: bx lr Admittedly this is a fairly contrived example, but the circumstances aren't completely implausible. Imagine someone using the low bit of a pointer as an additional flag, and relying on the hardware ignoring that bit. Paul