mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Fix some code to make it actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -90,11 +90,12 @@ Module* makeLLVMModule() {
|
|||||||
|
|
||||||
<div class="doc_code">
|
<div class="doc_code">
|
||||||
<pre>
|
<pre>
|
||||||
Constant* c->getOrInsertFunction("mul_add",
|
Constant* c = mod->getOrInsertFunction("mul_add",
|
||||||
/*ret type*/ IntegerType::get(32),
|
/*ret type*/ IntegerType::get(32),
|
||||||
/*args*/ IntegerType::get(32),
|
/*args*/ IntegerType::get(32),
|
||||||
IntegerType::get(32),
|
IntegerType::get(32),
|
||||||
IntegerType::get(32));
|
IntegerType::get(32),
|
||||||
|
/*varargs terminated with null*/ NULL);
|
||||||
|
|
||||||
Function* mul_add = cast<Function>(c);
|
Function* mul_add = cast<Function>(c);
|
||||||
mul_add->setCallingConv(CallingConv::C);
|
mul_add->setCallingConv(CallingConv::C);
|
||||||
@ -140,6 +141,8 @@ Module* makeLLVMModule() {
|
|||||||
tmp, z, "tmp2");
|
tmp, z, "tmp2");
|
||||||
|
|
||||||
builder.CreateRet(tmp2);
|
builder.CreateRet(tmp2);
|
||||||
|
|
||||||
|
return mod;
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user