Raymond Toy pushed to branch issue-355-solaris-x86-fp-trap-handler at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/float-trap.lisp
    ... ... @@ -483,15 +483,17 @@
    483 483
     (defun sigfpe-handler (signal code scp)
    
    484 484
       (declare (ignore signal)
    
    485 485
     	   (type system-area-pointer scp))
    
    486
    +  #+nil
    
    486 487
       (format t "***Enter Handler***~%")
    
    487 488
       (let* ((modes (sigcontext-floating-point-modes
    
    488 489
     		 (alien:sap-alien scp (* unix:sigcontext))))
    
    489 490
     	 (current-x87-modes (vm::x87-floating-point-modes))
    
    490 491
     	 (current-sse2-modes (vm::sse2-floating-point-modes)))
    
    492
    +    #+nil
    
    491 493
         (progn
    
    492
    -    (format t "Current modes:         ~32,'0b~%" modes)
    
    493
    -    (format t "Current HW x87 modes:  ~32,'0b~%" current-x87-modes)
    
    494
    -    (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
    
    494
    +      (format t "Current modes:         ~32,'0b~%" modes)
    
    495
    +      (format t "Current HW x87 modes:  ~32,'0b~%" current-x87-modes)
    
    496
    +      (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes))
    
    495 497
     
    
    496 498
         (multiple-value-bind (fop operands)
    
    497 499
     	(let ((sym (find-symbol "GET-FP-OPERANDS" "VM")))
    
    ... ... @@ -505,6 +507,7 @@
    505 507
           ;; This means we need to restore the fpu state ourselves.
    
    506 508
           (unwind-protect
    
    507 509
     	   (let ((fpe-info (second (assoc code +fpe-code-info-alist+))))
    
    510
    +	     #+nil
    
    508 511
     	     (format t "fpe code = ~D~%" code)
    
    509 512
     	     (if fpe-info
    
    510 513
     		 (error fpe-info
    
    ... ... @@ -520,20 +523,25 @@
    520 523
     		(logandc2 current-x87-modes trap-bit))
    
    521 524
     	       (new-sse2-modes
    
    522 525
     		(logandc2 current-sse2-modes trap-bit)))
    
    523
    -	  (format t "***Cleanup***~%")
    
    524
    -	  (format t "Trap bit: ~D~%" trap-bit)
    
    525
    -	  (format t "Current modes:         ~32,'0b~%" (vm::floating-point-modes))
    
    526
    -	  (format t "Current HW x87 modes:  ~32,'0b~%" current-x87-modes)
    
    527
    -	  (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
    
    528
    -	  (format t "New x87 modes:         ~32,'0b~%" new-x87-modes)
    
    529
    -	  (format t "New sse2 modes:        ~32,'0b~%" new-sse2-modes)
    
    526
    +	  #+nil
    
    527
    +	  (progn
    
    528
    +	    (format t "***Cleanup***~%")
    
    529
    +	    (format t "Trap bit: ~D~%" trap-bit)
    
    530
    +	    (format t "Current modes:         ~32,'0b~%" (vm::floating-point-modes))
    
    531
    +	    (format t "Current HW x87 modes:  ~32,'0b~%" current-x87-modes)
    
    532
    +	    (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
    
    533
    +	    (format t "New x87 modes:         ~32,'0b~%" new-x87-modes)
    
    534
    +	    (format t "New sse2 modes:        ~32,'0b~%" new-sse2-modes))
    
    535
    +	  #+nli
    
    530 536
     	  (format t "Setting new sse2 modes~%")
    
    531 537
     	  (setf (vm::sse2-floating-point-modes) new-sse2-modes)
    
    538
    +	  #+nil
    
    532 539
     	  (format t "Setting new x87 modes~%")
    
    533 540
     	  (setf (vm::x87-floating-point-modes) new-x87-modes)
    
    534
    -
    
    535
    -	  (format t "new x87 modes:         ~32,'0b~%" (vm::x87-floating-point-modes))
    
    536
    -	  (format t "new sse2 modes:        ~32,'0b~%" (vm::sse2-floating-point-modes))))))))
    
    541
    +	  #+nil
    
    542
    +	  (progn
    
    543
    +	    (format t "new x87 modes:         ~32,'0b~%" (vm::x87-floating-point-modes))
    
    544
    +	    (format t "new sse2 modes:        ~32,'0b~%" (vm::sse2-floating-point-modes))))))))
    
    537 545
     
    
    538 546
     #-(and solaris x86)
    
    539 547
     (macrolet