[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Reid Spencer
reid at x10sys.com
Mon Mar 5 21:03:34 PST 2007
Changes in directory llvm/lib/ExecutionEngine:
ExecutionEngine.cpp updated: 1.111 -> 1.112
---
Log message:
1. Make StoreValueToMemory a little more efficient by not requiring caller
to make a copy of the GenericValue.
2. Fix a copy & paste bug in StoreValueToMemory where 64-bit values were
truncated to 32
---
Diffs of the changes: (+2 -2)
ExecutionEngine.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.111 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.112
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.111 Mon Mar 5 21:04:04 2007
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Mon Mar 5 23:03:16 2007
@@ -410,7 +410,7 @@
/// It is not a pointer to a GenericValue containing the address at which to
/// store Val.
///
-void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
+void ExecutionEngine::StoreValueToMemory(const GenericValue &Val, GenericValue *Ptr,
const Type *Ty) {
switch (Ty->getTypeID()) {
case Type::IntegerTyID: {
@@ -423,7 +423,7 @@
} else if (BitWidth <= 32) {
*((uint32_t*)Ptr) = uint32_t(Val.IntVal.getZExtValue());
} else if (BitWidth <= 64) {
- *((uint64_t*)Ptr) = uint32_t(Val.IntVal.getZExtValue());
+ *((uint64_t*)Ptr) = uint64_t(Val.IntVal.getZExtValue());
} else {
uint64_t *Dest = (uint64_t*)Ptr;
const uint64_t *Src = Val.IntVal.getRawData();
More information about the llvm-commits
mailing list