In some specific case I'm forced to use unaligned reads/writes (ldr, str from/to addresses that are not 4-byte aligned).
I don't care for anything pre-armv6. Behavior of the CPU when unaligned access is made is controlled by a few flags: U flag to enable unaligned access, and A flag for unaligned access check. It seems that most of the phones that I have have unaligned access enabled by default.
My question: how can I check if unaligned access is OK on a particular android arm phone?
Unaligned memory access might potentially be handled by a trap in the kernel that does necessary stuff to "fix" the unaligned read making it exceptionally slow.
To be able to read the flags I need to access privileged CPU instruction (mrc p15,0,rN,c1,c0,0) that's not accessible to me.
I'd like to test somehow that this unaligned access is available and if it's not, then I'd use unoptimized slow functions that do not have alignment issues.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.