comparison gen/abi.cpp @ 991:223a679053dd

Fix x86_64 cfloat support to work on intended target :)
author Frits van Bommel <fvbommel wxs.nl>
date Thu, 26 Feb 2009 14:48:47 +0100
parents 420ef073448d
children 6e7dc3caccdd
comparison
equal deleted inserted replaced
990:2137797748a8 991:223a679053dd
163 163
164 // cast to double 164 // cast to double
165 v = gIR->ir->CreateBitCast(v, LLType::DoubleTy); 165 v = gIR->ir->CreateBitCast(v, LLType::DoubleTy);
166 166
167 // return {double} 167 // return {double}
168 const LLType* t = LLStructType::get(LLType::DoubleTy, 0); 168 const LLType* t = LLStructType::get(LLType::DoubleTy, NULL);
169 LLValue* undef = llvm::UndefValue::get(t); 169 LLValue* undef = llvm::UndefValue::get(t);
170 return gIR->ir->CreateInsertValue(undef, v, 0); 170 return gIR->ir->CreateInsertValue(undef, v, 0);
171 } 171 }
172 172
173 // {float,float} -> {double} 173 // {float,float} -> {double}
174 const LLType* type(const LLType* t) 174 const LLType* type(const LLType* t)
175 { 175 {
176 return LLStructType::get(LLType::DoubleTy, 0); 176 return LLStructType::get(LLType::DoubleTy, NULL);
177 } 177 }
178 178
179 // test if rewrite applies to function 179 // test if rewrite applies to function
180 bool test(TypeFunction* tf) 180 bool test(TypeFunction* tf)
181 { 181 {