aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-01 18:45:54 +0000
committerDan Gohman <gohman@apple.com>2009-04-01 18:45:54 +0000
commitcff6953c456fb359c971c3b0ae263d19ea4b4ae4 (patch)
treeaeb306a7c6461dd65eb8080f8b1c0ee057859521 /llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
parent7fdda1d695132fc22ffc4d3abbeb6b13ce8d04d9 (diff)
downloadllvm-cff6953c456fb359c971c3b0ae263d19ea4b4ae4.zip
llvm-cff6953c456fb359c971c3b0ae263d19ea4b4ae4.tar.gz
llvm-cff6953c456fb359c971c3b0ae263d19ea4b4ae4.tar.bz2
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. llvm-svn: 68227
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index f103609..a79bcc280 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/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;