Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VgcwQ-0005O9-Gb for mharc-grub-devel@gnu.org; Wed, 13 Nov 2013 11:05:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgcwJ-0005JW-9J for grub-devel@gnu.org; Wed, 13 Nov 2013 11:05:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgcwC-0004Z2-KU for grub-devel@gnu.org; Wed, 13 Nov 2013 11:05:11 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:46176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgcwC-0004WC-FP for grub-devel@gnu.org; Wed, 13 Nov 2013 11:05:04 -0500 Received: by mail-ee0-f51.google.com with SMTP id t10so303292eei.24 for ; Wed, 13 Nov 2013 08:05:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=pSk7ijgi+s+N/J8JdkTBNVe9OGDjqjoEFFRcncD7Zs8=; b=Mp4JnMAmbULU+/zoPxu2TMlI8dc+Yl2pPG1fGiyCnP1VbJ9AJ6mOwvlk/kVbEqdFIM 0ALORK6oz7p/Ak7BS5p+rHvvIulYbUOK8SDWjEAxPpUN4FBAAqVwkkuNfZtqtRU5nNmJ MXqMq8EeC2QWcVUrHevjCPapWwoOuqm4WSUaVyg8g+ACS13mAK1+/4S31GB2pj+tHuN8 x+nKUBzdlUrAtZEco/5ORKCbgon85+532TpJm9O3+kG9TumqnBazT5dIyOnOdnFeDi3z yFW2sDWA+ngTatE1Q2st9ILW19xvKkx5yAEaVEll9ht4AnlvBJQi3hgb+07Zn8DUM8qU 979A== X-Gm-Message-State: ALoCoQnEPSsVgX0zflW1Sl2688QhA0GTZu5ExV4L+f/DmcAaX0RAN4Z2043p52m0MieGCDHSEvsS X-Received: by 10.15.99.72 with SMTP id bk48mr50323791eeb.22.1384358703584; Wed, 13 Nov 2013 08:05:03 -0800 (PST) Received: from rocoto.smurfnet.nu ([2001:4b98:dc0:41:216:3eff:fea7:75f3]) by mx.google.com with ESMTPSA id x4sm89342387eef.1.2013.11.13.08.05.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 13 Nov 2013 08:05:02 -0800 (PST) Date: Wed, 13 Nov 2013 17:05:15 +0100 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Message-ID: <20131113160514.GX1557@rocoto.smurfnet.nu> References: <20131113144919.GB30137@riva.ucam.org> <528397A9.5020406@gmail.com> <20131113153654.GV1557@rocoto.smurfnet.nu> <52839E7C.2060408@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52839E7C.2060408@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.83.51 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 16:05:17 -0000 On Wed, Nov 13, 2013 at 04:45:00PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > >>> misc.S: Assembler messages: > >>> misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' > >>> make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1 > >>> > >>> I don't think SP can be used that way in Thumb mode? > >>> > >> I think that our asm routines should be in full ARM. Attached patch > >> follows this strategy. One remaining problem is to make sure that thumb > >> flags in TARGET_CFLAGS and TARGET_CCASFLAGS match. > > > > There should be no need for this - the only thing is to ensure the > > -mthumb-interwork is set in CCASFLAGS_PLATFORM as well as > > CFLAGS_PLATFORM, and even that is just to prevent linker warnings.. > > > > There is no special ARM_PROLOGUE needed, and (on armv5te onwards) > > pop {..., pc} is an interworking branch. > > > > If we want to force a file to build as ARM (which I'm not sure is > > necessary now that we have split up armv6 separate from later > > architectures), all that is required is a .arm directive up top. > > > Hm. I'm confused. According to > http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking: > "Note that specifying -mthumb-interwork does result in slightly larger, > slower code being produced. This is why interworking support must be > specifically enabled by a switch." That is fairly outdated documentation (1998). Yes, it was true before armv5te. Since then, pop {pc} has been valid, so different code sequences are no longer required for state changes than for normal subroutine calls. / Leif