Expand EHSELECTION and EHSELECTION nodes. Set the correct exception pointer and
authorAkira Hatanaka <ahatanaka@mips.com>
Thu, 2 Feb 2012 03:13:40 +0000 (03:13 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Thu, 2 Feb 2012 03:13:40 +0000 (03:13 +0000)
selector registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149584 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsISelLowering.cpp

index 2f366b39969511b65192328e43488e6eb891487c..227e6cc140249fd95419f9d359af65cb8415010d 100644 (file)
@@ -197,7 +197,9 @@ MipsTargetLowering(MipsTargetMachine &TM)
   setOperationAction(ISD::FMA,               MVT::f64,   Expand);
 
   setOperationAction(ISD::EXCEPTIONADDR,     MVT::i32, Expand);
+  setOperationAction(ISD::EXCEPTIONADDR,     MVT::i64, Expand);
   setOperationAction(ISD::EHSELECTION,       MVT::i32, Expand);
+  setOperationAction(ISD::EHSELECTION,       MVT::i64, Expand);
 
   setOperationAction(ISD::VAARG,             MVT::Other, Expand);
   setOperationAction(ISD::VACOPY,            MVT::Other, Expand);
@@ -248,8 +250,8 @@ MipsTargetLowering(MipsTargetMachine &TM)
   setStackPointerRegisterToSaveRestore(HasMips64 ? Mips::SP_64 : Mips::SP);
   computeRegisterProperties();
 
-  setExceptionPointerRegister(Mips::A0);
-  setExceptionSelectorRegister(Mips::A1);
+  setExceptionPointerRegister(IsN64 ? Mips::A0_64 : Mips::A0);
+  setExceptionSelectorRegister(IsN64 ? Mips::A1_64 : Mips::A1);
 }
 
 bool MipsTargetLowering::allowsUnalignedMemoryAccesses(EVT VT) const {