We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi I am using iND13400SAA controller.
But in the it's using Armv8-R AArch32
I see in your manual, that Divide by zero is not supported.
I tried creating floating point exception , even that is not supported.
Is there a way to trigger illegal instruction exception, so that i can verify that Exception_ISR configuration.
Two ways I can think off:
Try to execute an undefined instruction. Armv8 added an explicitly undefined instruction encoding (UDF) which is guaranteed to be undefined on all implementations.
Try to load from an invalid address will generate a page fault, not an undef exception.
Hi,
Thanks for the reply.
I tried to load an illegal address to a register as below.
This will trigger Data abort exception,
I even checked in manual they had mention
So when i tried
Software didn't cause UND exception
I even tried to mov PC, this caused prefetch exception
So is there any other way where i can test for UND exception?
Hi , Any update on this?
Or any other solution to trigger undefined exception
Pragathi Simha said: __asm("mov r15, r0")
I'm not sure which compiler you are using, but in most compilers the register numbers used in the inline assembler are just variables. You have no guarantee that your "r15" variable is actually stored in the physical r15 register.
You probably also need to make your asm blocks volatile to stop the compiler optimizing them out.
Pragathi Simha said:Or any other solution to trigger undefined exception
As suggested, emit the udf instruction. Something like:
__asm volatile("udf #0")