comparison gen/binops.cpp @ 244:a95056b3c996 trunk

[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB. Did a lot of smaller cleans up here and there. Replaced more llvm::Foo with LLFoo for common stuff. Split up tollvm.cpp.
author lindquist
date Mon, 09 Jun 2008 09:37:08 +0200
parents 7816aafeea3c
children ca2dfe98036c
comparison
equal deleted inserted replaced
243:4d006f7b2ada 244:a95056b3c996
33 ////////////////////////////////////////////////////////////////////////////// 33 //////////////////////////////////////////////////////////////////////////////
34 34
35 DValue* DtoBinDiv(DValue* lhs, DValue* rhs) 35 DValue* DtoBinDiv(DValue* lhs, DValue* rhs)
36 { 36 {
37 Type* t = lhs->getType(); 37 Type* t = lhs->getType();
38 llvm::Value *l, *r; 38 LLValue *l, *r;
39 l = lhs->getRVal(); 39 l = lhs->getRVal();
40 r = rhs->getRVal(); 40 r = rhs->getRVal();
41 LLValue* res; 41 LLValue* res;
42 if (t->isfloating()) 42 if (t->isfloating())
43 res = gIR->ir->CreateFDiv(l, r, "tmp"); 43 res = gIR->ir->CreateFDiv(l, r, "tmp");
51 ////////////////////////////////////////////////////////////////////////////// 51 //////////////////////////////////////////////////////////////////////////////
52 52
53 DValue* DtoBinRem(DValue* lhs, DValue* rhs) 53 DValue* DtoBinRem(DValue* lhs, DValue* rhs)
54 { 54 {
55 Type* t = lhs->getType(); 55 Type* t = lhs->getType();
56 llvm::Value *l, *r; 56 LLValue *l, *r;
57 l = lhs->getRVal(); 57 l = lhs->getRVal();
58 r = rhs->getRVal(); 58 r = rhs->getRVal();
59 LLValue* res; 59 LLValue* res;
60 if (t->isfloating()) 60 if (t->isfloating())
61 res = gIR->ir->CreateFRem(l, r, "tmp"); 61 res = gIR->ir->CreateFRem(l, r, "tmp");