comparison gen/toir.cpp @ 1378:5575e0c07e1a

Use %La to hex-format a real instead of pretending it's an integer.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 17 May 2009 11:06:14 +0200
parents 3fb15be5ab6d
children 6063ddfcf27d
comparison
equal deleted inserted replaced
1377:3fb15be5ab6d 1378:5575e0c07e1a
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <math.h> 10 #include <math.h>
11 #include <fstream> 11 #include <fstream>
12 12
13 #include "gen/llvm.h" 13 #include "gen/llvm.h"
14 #include "llvm/Support/DataTypes.h"
15 14
16 #include "attrib.h" 15 #include "attrib.h"
17 #include "init.h" 16 #include "init.h"
18 #include "mtype.h" 17 #include "mtype.h"
19 #include "template.h" 18 #include "template.h"
312 311
313 ////////////////////////////////////////////////////////////////////////////////////////// 312 //////////////////////////////////////////////////////////////////////////////////////////
314 313
315 LLConstant* RealExp::toConstElem(IRState* p) 314 LLConstant* RealExp::toConstElem(IRState* p)
316 { 315 {
317 Logger::print("RealExp::toConstElem: %s @ %s | %LX\n", toChars(), type->toChars(), 316 Logger::print("RealExp::toConstElem: %s @ %s | %La\n", toChars(), type->toChars(), value);
318 UINT64_C(0xFFFFFFFFFF) & *(long long unsigned*)&value);
319 LOG_SCOPE; 317 LOG_SCOPE;
320 Type* t = type->toBasetype(); 318 Type* t = type->toBasetype();
321 return DtoConstFP(t, value); 319 return DtoConstFP(t, value);
322 } 320 }
323 321