From de551f91d8816632a76a065084caab9fab6aacff Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 1 Apr 2009 18:45:54 +0000 Subject: Use CHAR_BIT instead of hard-coding 8 in several places where it is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/Execution.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index f10360903f..a79bcc2803 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1092,10 +1092,10 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy, Dest.PointerVal = Src.PointerVal; } else if (DstTy->isInteger()) { if (SrcTy == Type::FloatTy) { - Dest.IntVal.zext(sizeof(Src.FloatVal) * 8); + Dest.IntVal.zext(sizeof(Src.FloatVal) * CHAR_BIT); Dest.IntVal.floatToBits(Src.FloatVal); } else if (SrcTy == Type::DoubleTy) { - Dest.IntVal.zext(sizeof(Src.DoubleVal) * 8); + Dest.IntVal.zext(sizeof(Src.DoubleVal) * CHAR_BIT); Dest.IntVal.doubleToBits(Src.DoubleVal); } else if (SrcTy->isInteger()) { Dest.IntVal = Src.IntVal; -- cgit v1.2.3-70-g09d2