Index: /trunk/source/lisp-kernel/arm-exceptions.c
===================================================================
--- /trunk/source/lisp-kernel/arm-exceptions.c	(revision 14516)
+++ /trunk/source/lisp-kernel/arm-exceptions.c	(revision 14517)
@@ -1394,4 +1394,60 @@
 }
 
+
+void
+sigill_handler(int signum, siginfo_t *info, ExceptionInformation  *xp)
+{
+  pc program_counter = xpPC(xp);
+  opcode instr = *program_counter;
+
+  if (IS_UUO(instr)) {
+    natural psr = xpPSR(xp);
+    Boolean opcode_matched_condition = false,
+      flip = ((instr & (1<<28)) != 0);
+   
+
+    switch (instr >> 29) {
+    case 0: 
+      opcode_matched_condition = ((psr & PSR_Z_MASK) != 0);
+      break;
+    case 1:
+      opcode_matched_condition = ((psr & PSR_C_MASK) != 0);
+      break;
+    case 2:
+      opcode_matched_condition = ((psr & PSR_N_MASK) != 0);
+      break;
+    case 3:
+      opcode_matched_condition = ((psr & PSR_V_MASK) != 0);
+      break;
+    case 4:
+      opcode_matched_condition = (((psr & PSR_C_MASK) != 0) &&
+                                  ((psr & PSR_Z_MASK) == 0));
+      break;
+    case 5:
+      opcode_matched_condition = (((psr & PSR_N_MASK) != 0) ==
+                                  ((psr & PSR_V_MASK) != 0));
+      break;
+    case 6:
+      opcode_matched_condition = ((((psr & PSR_N_MASK) != 0) ==
+                                   ((psr & PSR_V_MASK) != 0)) &&
+                                  ((psr & PSR_Z_MASK) == 0));
+      break;
+    case 7:
+      opcode_matched_condition = true;
+      flip = false;
+      break;
+    }
+    if (flip) {
+      opcode_matched_condition = !opcode_matched_condition;
+    }
+    if (!opcode_matched_condition) {
+      adjust_exception_pc(xp,4);
+      return;
+    }
+  }
+  signal_handler(signum,info,xp, NULL, 0, 0);
+}
+
+
 #ifdef USE_SIGALTSTACK
 void
@@ -1723,5 +1779,5 @@
     ;
   if (install_signal_handlers_for_exceptions) {
-    install_signal_handler(SIGILL, (void *)signal_handler, true, false);
+    install_signal_handler(SIGILL, (void *)sigill_handler, true, false);
     install_signal_handler(SIGSEGV, (void *)ALTSTACK(signal_handler),true, true);
 
