mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -377,7 +377,8 @@ GenericValue lle_X_sprintf(FunctionType *M, const vector<GenericValue> &Args) {
|
|||||||
case 'u': case 'o':
|
case 'u': case 'o':
|
||||||
case 'x': case 'X':
|
case 'x': case 'X':
|
||||||
if (HowLong >= 1) {
|
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
|
// Make sure we use %lld with a 64 bit argument because we might be
|
||||||
// compiling LLI on a 32 bit compiler.
|
// compiling LLI on a 32 bit compiler.
|
||||||
unsigned Size = strlen(FmtBuf);
|
unsigned Size = strlen(FmtBuf);
|
||||||
|
Reference in New Issue
Block a user