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
    ... ... @@ -486,17 +486,12 @@
    486 486
       (format t "***Enter Handler***~%")
    
    487 487
       (let* ((modes (sigcontext-floating-point-modes
    
    488 488
     		 (alien:sap-alien scp (* unix:sigcontext))))
    
    489
    -	 (sigcontext-x87-modes (sigcontext-floating-point-modes-x87
    
    490
    -				(alien:sap-alien scp (* unix:sigcontext))))
    
    491
    -	 (sigcontext-sse2-modes (sigcontext-floating-point-modes-sse2
    
    492
    -				 (alien:sap-alien scp (* unix:sigcontext))))
    
    493 489
     	 (current-x87-modes (vm::x87-floating-point-modes))
    
    494 490
     	 (current-sse2-modes (vm::sse2-floating-point-modes)))
    
    491
    +    (progn
    
    495 492
         (format t "Current modes:         ~32,'0b~%" modes)
    
    496 493
         (format t "Current HW x87 modes:  ~32,'0b~%" current-x87-modes)
    
    497 494
         (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
    
    498
    -    (format t "sigcontext x87:        ~32,'0b~%" sigcontext-x87-modes)
    
    499
    -    (format t "sigcontext sse2:       ~32,'0b~%" sigcontext-sse2-modes)
    
    500 495
     
    
    501 496
         (multiple-value-bind (fop operands)
    
    502 497
     	(let ((sym (find-symbol "GET-FP-OPERANDS" "VM")))
    
    ... ... @@ -520,7 +515,6 @@
    520 515
     	;;
    
    521 516
     	;; Clear out the status for any enabled traps.  If we don't
    
    522 517
     	;; then when we return, the exception gets signaled again.
    
    523
    -	;;#+nil
    
    524 518
     	(let* ((trap-bit (third (assoc code +fpe-code-info-alist+)))
    
    525 519
     	       (new-x87-modes
    
    526 520
     		(logandc2 current-x87-modes trap-bit))
    
    ... ... @@ -533,40 +527,13 @@
    533 527
     	  (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
    
    534 528
     	  (format t "New x87 modes:         ~32,'0b~%" new-x87-modes)
    
    535 529
     	  (format t "New sse2 modes:        ~32,'0b~%" new-sse2-modes)
    
    536
    -	  (ignore-errors
    
    537
    -	   (format t "Setting new sse2 modes~%")
    
    538
    -	   (let ((new-context (logandc2 sigcontext-sse2-modes trap-bit)))
    
    539
    -	     (format t "New sse2 sigcontext:   ~32,'0b~%" new-context)
    
    540
    -	     (setf (vm::sse2-floating-point-modes) new-sse2-modes)
    
    541
    -	     (%set-sigcontext-floating-point-modes-sse2
    
    542
    -	      (alien:sap-alien scp (* unix:sigcontext))
    
    543
    -	      new-context)))
    
    544
    -	  (ignore-errors
    
    545
    -	    (format t "Setting new x87 modes~%")
    
    546
    -	    (let ((new-context (logandc2 sigcontext-x87-modes trap-bit)))
    
    547
    -	      (format t "New x87 sigcontext:    ~32,'0b~%" new-context)
    
    548
    -	      (setf (vm::x87-floating-point-modes) new-x87-modes)
    
    549
    -	      (%set-sigcontext-floating-point-modes-x87
    
    550
    -	       (alien:sap-alien scp (* unix:sigcontext))
    
    551
    -	       new-context)))
    
    530
    +	  (format t "Setting new sse2 modes~%")
    
    531
    +	  (setf (vm::sse2-floating-point-modes) new-sse2-modes)
    
    532
    +	  (format t "Setting new x87 modes~%")
    
    533
    +	  (setf (vm::x87-floating-point-modes) new-x87-modes)
    
    552 534
     
    
    553 535
     	  (format t "new x87 modes:         ~32,'0b~%" (vm::x87-floating-point-modes))
    
    554
    -	  (format t "new sse2 modes:        ~32,'0b~%" (vm::sse2-floating-point-modes)))
    
    555
    -	#+nil
    
    556
    -	(let* ((trap-bit (third (assoc code +fpe-code-info-alist+)))
    
    557
    -	       (x87-modes (sigcontext-floating-point-modes-x87
    
    558
    -			   (alien:sap-alien scp (* unix:sigcontext))))
    
    559
    -	       (sse2-modes (sigcontext-floating-point-modes-sse2
    
    560
    -			    (alien:sap-alien scp (* unix:sigcontext)))))
    
    561
    -	  (format t "Trap bit: ~D~%" trap-bit)
    
    562
    -	  (format t "New sigcontext x87:     ~32,'0b~%" (logandc2 x87-modes trap-bit))
    
    563
    -	  (format t "New sigcontext sse2:    ~32,'0b~%" (logandc2 sse2-modes trap-bit))
    
    564
    -	  (%set-sigcontext-floating-point-modes-x87
    
    565
    -	   (alien:sap-alien scp (* unix:sigcontext))
    
    566
    -	   (logandc2 x87-modes trap-bit))
    
    567
    -	  (%set-sigcontext-floating-point-modes-sse2
    
    568
    -	   (alien:sap-alien scp (* unix:sigcontext))
    
    569
    -	   (logandc2 sse2-modes trap-bit)))))))
    
    536
    +	  (format t "new sse2 modes:        ~32,'0b~%" (vm::sse2-floating-point-modes))))))))
    
    570 537
     
    
    571 538
     #-(and solaris x86)
    
    572 539
     (macrolet