summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.h')
-rw-r--r--src/mesa/pipe/llvm/instructions.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/instructions.h b/src/mesa/pipe/llvm/instructions.h
index 82d871d410..85feb1665d 100644
--- a/src/mesa/pipe/llvm/instructions.h
+++ b/src/mesa/pipe/llvm/instructions.h
@@ -37,6 +37,7 @@
#include <llvm/Module.h>
#include <llvm/Value.h>
+#include <map>
#include <stack>
namespace llvm {
@@ -44,6 +45,8 @@ namespace llvm {
class Function;
}
+class Storage;
+
class Instructions
{
public:
@@ -55,7 +58,10 @@ public:
llvm::Value *arl(llvm::Value *in1);
llvm::Value *add(llvm::Value *in1, llvm::Value *in2);
void beginLoop();
+ void bgnSub(unsigned, Storage *);
void brk();
+ void cal(int label, llvm::Value *out, llvm::Value *in,
+ llvm::Value *cst);
llvm::Value *cross(llvm::Value *in1, llvm::Value *in2);
llvm::Value *dp3(llvm::Value *in1, llvm::Value *in2);
llvm::Value *dp4(llvm::Value *in1, llvm::Value *in2);
@@ -65,6 +71,7 @@ public:
void endif();
void endLoop();
void end();
+ void endSub();
llvm::Value *ex2(llvm::Value *in);
llvm::Value *floor(llvm::Value *in);
llvm::Value *frc(llvm::Value *in);
@@ -101,6 +108,9 @@ private:
llvm::Value *z, llvm::Value *w=0);
llvm::Function *declarePrintf();
+ llvm::Function *declareFunc(int label);
+
+ llvm::Function *findFunction(int label);
private:
llvm::Module *m_mod;
llvm::Function *m_func;
@@ -125,6 +135,7 @@ private:
llvm::BasicBlock *end;
};
std::stack<Loop> m_loopStack;
+ std::map<int, llvm::Function*> m_functions;
};
#endif