diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-25 18:28:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-25 18:28:44 +0000 |
commit | 01971e126713e899598388fdbe6baf804f467981 (patch) | |
tree | 91731e8f9a0a929ce760d33f5f5c87721b2aa757 /llvm/lib/ExecutionEngine/Interpreter | |
parent | 4c5245b14429a578d3ecd922561e751e24a3d23c (diff) | |
download | bcm5719-llvm-01971e126713e899598388fdbe6baf804f467981.tar.gz bcm5719-llvm-01971e126713e899598388fdbe6baf804f467981.zip |
Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
llvm-svn: 5942
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index f8e1288f1db..aa900ea3b43 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -377,7 +377,8 @@ GenericValue lle_X_sprintf(FunctionType *M, const vector<GenericValue> &Args) { case 'u': case 'o': case 'x': case 'X': if (HowLong >= 1) { - if (HowLong == 1) { + if (HowLong == 1 && TheInterpreter->getModule().has64BitPointers() && + sizeof(long) < sizeof(long long)) { // Make sure we use %lld with a 64 bit argument because we might be // compiling LLI on a 32 bit compiler. unsigned Size = strlen(FmtBuf); |