Re: Which port for armv4l?
On Wed, 17 Aug 2016, Tixy wrote:
> BX is the only ARM state instruction on ARMv4 that exists for Thumb
> interworking.
What about other (conditional) branch exchange instructions (BXCC, BXNE
etc.)?
> Why would the code be trying to enter Thumb state if it isn't compiled
> for Thumb?
Is it possible for a compiler to generate BX instructions without Thumb
code (for example to return from a function with bx lr, where lr will
always be even - no Thumb)?
Correct me if I'm wrong, but I thought that BX patch (to emulate BX
instruction in kernel) was supposed to allow running code with BX
instructions on a processor that lacks it, and that's why I want to use it
(to run Debian for armel on StrongARM SA-1100, which has ARMv4 core, so
without Thumb). Code in Debian for armel architecture doesn't use Thumb?
> > Shouldn't the patch handle addresses with bit0=1 differently?
>
> I haven't looked at the patch so don't see what it does,
It just copies contents of the register specified in the last nibble of
the instruction to PC.
int reg = instr & 0xf;
regs->ARM_pc = regs->uregs[reg];
--
Adam Wysocki
http://www.chmurka.net/
Reply to: