On Thu, 19 Sep 2019 at 14:25, Leif Lindholm <leif.lindh...@linaro.org> wrote: > > On Thu, Sep 19, 2019 at 01:53:35PM +0300, Ard Biesheuvel wrote: > > > > I mean that I'd prefer to assemble the .asm files in ARM mode, > > > > especially since I am not convinced that the startup code we have is > > > > guaranteed to switch into the right mode after the CPU comes out of > > > > reset in ARM mode. > > > > > > That could be resolved with a trivial branch at that point (or just > > > forcing ARM for the whole entry file) though. > > > > > > > Of course. > > > > The problem is that the first branch instruction is patched into the > > FV files by the BaseTools, and so the startup code is entered in ARM > > mode by default. > > > > So that means we'll either have to > > 1) switch to ARM mode > > 2) emit one branch instruction > > 3) switch back to Thumb mode > > I was thinking more like tying down the entry function (or as I said, > the whole file) as ARM, then letting the toolchain decide for the bits > where we don't have instuction-set dependent ABIs. > > > 4) fix up all the code so it assembles in Thumb mode > > Which is what Baptiste has done in this set. > > > 1) switch to ARM mode > > In all 48 files (+3 in edk2-platforms), or just the ones where not > doing so triggers build errors? Currently. > > I'm OK with restricting ourselves to just setting ARM in the > triggering files for simplicity, especially in order to streamline the > toolchain migration from RVCT to VS (and the subsequent purge of PVCT > support). I'm not seeing it as a solution. >
As long as we align the .asm files with the .S files, I am fine with that. And since we focus on v7+ only these days, I'm fine with changing existing ARM files to Thumb2. What I don't want is a situation where the toolchain's default decides how code is assembled, since that means you have to test all your code changes twice. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47597): https://edk2.groups.io/g/devel/message/47597 Mute This Topic: https://groups.io/mt/34187299/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-