This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to do the ARM state change between 64-bit and 32-bit?

Hi,

The latest 64-bit architecture can on both AArch64 and AArch32 state.

Can someone tell me how to utilize this feature so that I can seamlessly integrate algorithms (which are optimized with 32-bit and 64-bit instructions) with applications which are build for 32-bit and 64-bit modes.

Here is the specifics of situation which I am facing right now.

I want to link an ARM shared library which is optimized with 64-bit instructions with my application which is built in 32 bit mode.

At the time of linking I am getting the following error.  "skipping incompatible xxxx.so file".

My build environment is android and unfortunately I don't have the option to build my application in 64-bit mode.

Appreciate your help with inputs.

Thanks, Prasad

Parents
  • Hi Prasad,

    I think you need to write some code in A64 for execution when the processor reset or in a exception level higher than EL0. The code need to set the ELR to your 32bit code start address, and set the PE state of CPSR to aarch32, then return from this EL to EL0 where your code executes from this state. After than your 32bit code can run correctly.

Reply
  • Hi Prasad,

    I think you need to write some code in A64 for execution when the processor reset or in a exception level higher than EL0. The code need to set the ELR to your 32bit code start address, and set the PE state of CPSR to aarch32, then return from this EL to EL0 where your code executes from this state. After than your 32bit code can run correctly.

Children