comparison gen/complex.h @ 104:4d1e9eb001e0 trunk

[svn r108] Now basic suppport for complex types. =,+,-,*,/ are supported.
author lindquist
date Mon, 19 Nov 2007 02:58:58 +0100
parents
children 3efbcc81ba45
comparison
equal deleted inserted replaced
103:855adfdb8d38 104:4d1e9eb001e0
1 #ifndef LLVMDC_GEN_COMPLEX_H
2 #define LLVMDC_GEN_COMPLEX_H
3
4 const llvm::StructType* DtoComplexType(Type* t);
5 const llvm::Type* DtoComplexBaseType(Type* t);
6
7 llvm::Constant* DtoConstComplex(Type* t, llvm::Constant* re, llvm::Constant* im);
8 llvm::Constant* DtoConstComplex(Type* t, long double re, long double im);
9 llvm::Constant* DtoUndefComplex(Type* _ty);
10
11 llvm::Constant* DtoComplexShuffleMask(unsigned a, unsigned b);
12
13 llvm::Value* DtoRealPart(DValue* val);
14 llvm::Value* DtoImagPart(DValue* val);
15 DValue* DtoComplex(Type* to, DValue* val);
16
17 void DtoComplexAssign(llvm::Value* l, llvm::Value* r);
18 void DtoComplexSet(llvm::Value* c, llvm::Value* re, llvm::Value* im);
19
20 DValue* DtoComplexAdd(Type* type, DValue* lhs, DValue* rhs);
21 DValue* DtoComplexSub(Type* type, DValue* lhs, DValue* rhs);
22 DValue* DtoComplexMul(Type* type, DValue* lhs, DValue* rhs);
23 DValue* DtoComplexDiv(Type* type, DValue* lhs, DValue* rhs);
24
25 llvm::Value* DtoComplexEquals(TOK op, DValue* lhs, DValue* rhs);
26
27 #endif // LLVMDC_GEN_COMPLEX_H