Changeset 14517
- Timestamp:
- Dec 26, 2010, 7:51:30 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/source/lisp-kernel/arm-exceptions.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/arm-exceptions.c
r14515 r14517 1394 1394 } 1395 1395 1396 1397 void 1398 sigill_handler(int signum, siginfo_t *info, ExceptionInformation *xp) 1399 { 1400 pc program_counter = xpPC(xp); 1401 opcode instr = *program_counter; 1402 1403 if (IS_UUO(instr)) { 1404 natural psr = xpPSR(xp); 1405 Boolean opcode_matched_condition = false, 1406 flip = ((instr & (1<<28)) != 0); 1407 1408 1409 switch (instr >> 29) { 1410 case 0: 1411 opcode_matched_condition = ((psr & PSR_Z_MASK) != 0); 1412 break; 1413 case 1: 1414 opcode_matched_condition = ((psr & PSR_C_MASK) != 0); 1415 break; 1416 case 2: 1417 opcode_matched_condition = ((psr & PSR_N_MASK) != 0); 1418 break; 1419 case 3: 1420 opcode_matched_condition = ((psr & PSR_V_MASK) != 0); 1421 break; 1422 case 4: 1423 opcode_matched_condition = (((psr & PSR_C_MASK) != 0) && 1424 ((psr & PSR_Z_MASK) == 0)); 1425 break; 1426 case 5: 1427 opcode_matched_condition = (((psr & PSR_N_MASK) != 0) == 1428 ((psr & PSR_V_MASK) != 0)); 1429 break; 1430 case 6: 1431 opcode_matched_condition = ((((psr & PSR_N_MASK) != 0) == 1432 ((psr & PSR_V_MASK) != 0)) && 1433 ((psr & PSR_Z_MASK) == 0)); 1434 break; 1435 case 7: 1436 opcode_matched_condition = true; 1437 flip = false; 1438 break; 1439 } 1440 if (flip) { 1441 opcode_matched_condition = !opcode_matched_condition; 1442 } 1443 if (!opcode_matched_condition) { 1444 adjust_exception_pc(xp,4); 1445 return; 1446 } 1447 } 1448 signal_handler(signum,info,xp, NULL, 0, 0); 1449 } 1450 1451 1396 1452 #ifdef USE_SIGALTSTACK 1397 1453 void … … 1723 1779 ; 1724 1780 if (install_signal_handlers_for_exceptions) { 1725 install_signal_handler(SIGILL, (void *)sig nal_handler, true, false);1781 install_signal_handler(SIGILL, (void *)sigill_handler, true, false); 1726 1782 install_signal_handler(SIGSEGV, (void *)ALTSTACK(signal_handler),true, true); 1727 1783
Note:
See TracChangeset
for help on using the changeset viewer.
