Determining if rotated loads are supported
Jon Abbott (1421) 2651 posts |
Is there an OS call to determine if rotated loads are supported on the current platform? OS_PlatformFeatures 0 doesn’t look like it has a flag for it. |
Jeffrey Lee (213) 6048 posts |
No, there isn’t an OS call for it. It’s probably easiest to just read the current setting from the system control register. Bit 1 will be set if alignment exceptions are enabled, and bit 22 will be set if ARMv7-style unaligned loads are in use (with bit 1 taking priority if they’re both set). I guess if you did want to use an OS SWI, OS_MMUControl 0 would be what you want. |
Jon Abbott (1421) 2651 posts |
I’ve purposely avoided that method, as ARM have a habit of breaking backward compatibility. The route I’ve now taken is to turn IRQ/FIQ off, claim the Abort vector and try an unaligned load – its the only method I could think of that doesn’t touch bare metal. |