diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-10-25 11:47:25 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-10-25 11:47:25 -0400 |
commit | 4a4e6f2cabdf39e9032e3e513f9966f471454077 (patch) | |
tree | be8abacf1a2b5e71c51217fbfcca17e244c8ad24 /src/mesa/pipe/llvm/instructions.h | |
parent | 1d17cb721afaa53317614af90488a45c26e083e3 (diff) |
Implement loops
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.h')
-rw-r--r-- | src/mesa/pipe/llvm/instructions.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/instructions.h b/src/mesa/pipe/llvm/instructions.h index b0608e1da6..29ae168e76 100644 --- a/src/mesa/pipe/llvm/instructions.h +++ b/src/mesa/pipe/llvm/instructions.h @@ -54,13 +54,16 @@ public: llvm::Value *abs(llvm::Value *in1); llvm::Value *arl(llvm::Value *in1); llvm::Value *add(llvm::Value *in1, llvm::Value *in2); + void beginLoop(); + void brk(); 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); llvm::Value *dph(llvm::Value *in1, llvm::Value *in2); llvm::Value *dst(llvm::Value *in1, llvm::Value *in2); - void endif(); void elseop(); + void endif(); + void endLoop(); llvm::Value *ex2(llvm::Value *in); llvm::Value *floor(llvm::Value *in); llvm::Value *frc(llvm::Value *in); @@ -81,6 +84,7 @@ public: llvm::Value *sgt(llvm::Value *in1, llvm::Value *in2); llvm::Value *slt(llvm::Value *in1, llvm::Value *in2); llvm::Value *sub(llvm::Value *in1, llvm::Value *in2); + llvm::Value *trunc(llvm::Value *in); void printVector(llvm::Value *val); private: @@ -115,6 +119,11 @@ private: llvm::Constant *m_fmtPtr; std::stack<llvm::BasicBlock*> m_ifStack; + struct Loop { + llvm::BasicBlock *begin; + llvm::BasicBlock *end; + }; + std::stack<Loop> m_loopStack; }; #endif |