Mercurial > projects > ldc
comparison gen/tollvm.cpp @ 317:1a2777460bd5 trunk
[svn r338] Intrinsic calls can never be invokes.
author | ChristianK |
---|---|
date | Fri, 04 Jul 2008 08:55:58 +0200 |
parents | a9697749e898 |
children | 0d52412d5b1a |
comparison
equal
deleted
inserted
replaced
316:163cad969791 | 317:1a2777460bd5 |
---|---|
408 if (global.params.is64bit) | 408 if (global.params.is64bit) |
409 fn = GET_INTRINSIC_DECL(memset_i64); | 409 fn = GET_INTRINSIC_DECL(memset_i64); |
410 else | 410 else |
411 fn = GET_INTRINSIC_DECL(memset_i32); | 411 fn = GET_INTRINSIC_DECL(memset_i32); |
412 | 412 |
413 gIR->CreateCallOrInvoke4(fn, dst, DtoConstUbyte(0), nbytes, DtoConstUint(0)); | 413 gIR->ir->CreateCall4(fn, dst, DtoConstUbyte(0), nbytes, DtoConstUint(0), ""); |
414 } | 414 } |
415 | 415 |
416 ////////////////////////////////////////////////////////////////////////////////////////// | 416 ////////////////////////////////////////////////////////////////////////////////////////// |
417 | 417 |
418 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes) | 418 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes) |
424 if (global.params.is64bit) | 424 if (global.params.is64bit) |
425 fn = GET_INTRINSIC_DECL(memcpy_i64); | 425 fn = GET_INTRINSIC_DECL(memcpy_i64); |
426 else | 426 else |
427 fn = GET_INTRINSIC_DECL(memcpy_i32); | 427 fn = GET_INTRINSIC_DECL(memcpy_i32); |
428 | 428 |
429 gIR->CreateCallOrInvoke4(fn, dst, src, nbytes, DtoConstUint(0)); | 429 gIR->ir->CreateCall4(fn, dst, src, nbytes, DtoConstUint(0), ""); |
430 } | 430 } |
431 | 431 |
432 ////////////////////////////////////////////////////////////////////////////////////////// | 432 ////////////////////////////////////////////////////////////////////////////////////////// |
433 | 433 |
434 void DtoAggrZeroInit(LLValue* v) | 434 void DtoAggrZeroInit(LLValue* v) |
457 llargs.push_back(DtoConstBool(ls)); | 457 llargs.push_back(DtoConstBool(ls)); |
458 llargs.push_back(DtoConstBool(sl)); | 458 llargs.push_back(DtoConstBool(sl)); |
459 llargs.push_back(DtoConstBool(ss)); | 459 llargs.push_back(DtoConstBool(ss)); |
460 llargs.push_back(DtoConstBool(device)); | 460 llargs.push_back(DtoConstBool(device)); |
461 | 461 |
462 gIR->CreateCallOrInvoke(fn, llargs.begin(), llargs.end()); | 462 llvm::CallInst::Create(fn, llargs.begin(), llargs.end(), "", gIR->scopebb()); |
463 } | 463 } |
464 | 464 |
465 ////////////////////////////////////////////////////////////////////////////////////////// | 465 ////////////////////////////////////////////////////////////////////////////////////////// |
466 | 466 |
467 llvm::ConstantInt* DtoConstSize_t(size_t i) | 467 llvm::ConstantInt* DtoConstSize_t(size_t i) |