aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-01-24 23:18:43 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-01-24 23:18:43 +0000
commit25dae8f4a30634c1f9cd483b13995ecf44fecec6 (patch)
treecab4cea5c9602f555bb582efb61499b631fc8b62 /lib/Target/Mips
parent08067b26f7fd0e8e3c4141c5a48da32af616a760 (diff)
downloadexternal_llvm-25dae8f4a30634c1f9cd483b13995ecf44fecec6.zip
external_llvm-25dae8f4a30634c1f9cd483b13995ecf44fecec6.tar.gz
external_llvm-25dae8f4a30634c1f9cd483b13995ecf44fecec6.tar.bz2
Sign-extend 32-bit integer arguments when they are passed in 64-bit registers,
which is what N32/64 does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp
index 96b297c..2f366b3 100644
--- a/lib/Target/Mips/MipsISelLowering.cpp
+++ b/lib/Target/Mips/MipsISelLowering.cpp
@@ -2299,7 +2299,10 @@ MipsTargetLowering::LowerCall(SDValue InChain, SDValue Callee,
Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, LocVT, Arg);
break;
case CCValAssign::AExt:
- Arg = DAG.getNode(ISD::ANY_EXTEND, dl, LocVT, Arg);
+ if (ValVT == MVT::i32)
+ Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, LocVT, Arg);
+ else
+ Arg = DAG.getNode(ISD::ANY_EXTEND, dl, LocVT, Arg);
break;
}