From 3fb0e203cd5ddd34cd741f307bea863c70793927 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Tue, 16 Mar 2004 22:45:42 +0000 Subject: [PATCH] Fix bug in zero-extending of shorts. llvm-svn: 12453 --- llvm/lib/Target/SparcV8/InstSelectSimple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/SparcV8/InstSelectSimple.cpp b/llvm/lib/Target/SparcV8/InstSelectSimple.cpp index 1ba42858d0e1..890e55d4d3db 100644 --- a/llvm/lib/Target/SparcV8/InstSelectSimple.cpp +++ b/llvm/lib/Target/SparcV8/InstSelectSimple.cpp @@ -289,8 +289,8 @@ void V8ISel::visitBinaryOperator (BinaryOperator &I) { BuildMI (BB, V8::SRAri, 2, DestReg).addReg (TmpReg).addZImm (16); } else { // add ushort unsigned TmpReg = makeAnotherReg (I.getType ()); - BuildMI (BB, V8::SLLri, 2, TmpReg).addReg (ResultReg).addZImm (24); - BuildMI (BB, V8::SRLri, 2, DestReg).addReg (TmpReg).addZImm (24); + BuildMI (BB, V8::SLLri, 2, TmpReg).addReg (ResultReg).addZImm (16); + BuildMI (BB, V8::SRLri, 2, DestReg).addReg (TmpReg).addZImm (16); } break; case cInt: