From 6ae74240bfa83dafcc6251b8a014a080d757df33 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Fri, 22 Aug 2014 20:19:00 -0700
Subject: [PATCH] Give up trying to get the operands if we don't know what the
 FP operation was.

This shows up when fdlibm_setexception signals an exception. It seems
to set the exception bits directly instead of trying to do the
operation. This was confusing get-fp-operands.
---
 src/compiler/ppc/float.lisp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/ppc/float.lisp b/src/compiler/ppc/float.lisp
index 200772f3e..c5c944bd4 100644
--- a/src/compiler/ppc/float.lisp
+++ b/src/compiler/ppc/float.lisp
@@ -1445,6 +1445,9 @@
   ;; operands, if we can.
   (multiple-value-bind (fop format rd rs1 rs2)
       (get-fp-operation scp)
+    (unless fop
+      ;; Give up if we don't know the operation
+      (return-from get-fp-operands (values nil (list nil nil))))
     (let ((traps (logand (ldb float-exceptions-byte modes)
 			 (ldb float-traps-byte modes)))
 	  (fs1 (and fop rs1 (sigcontext-float-register scp rs1 format)))
-- 
GitLab