diff options
author | Tom Stellard <tstellar@gmail.com> | 2010-12-09 00:44:03 -0800 |
---|---|---|
committer | Tom Stellard <tstellar@gmail.com> | 2010-12-09 00:44:03 -0800 |
commit | 5c16dd6f39da486d31e890d068cb7987a1785c5a (patch) | |
tree | 200535f81df43d76f6aea573bde385be8e260962 /emulator.h | |
parent | 107f4e5aa5def40ad42db49c0f5b46a7d64700a0 (diff) |
Get basic functionality working with a simple test case.
Diffstat (limited to 'emulator.h')
-rw-r--r-- | emulator.h | 35 |
1 files changed, 31 insertions, 4 deletions
@@ -2,11 +2,38 @@ #ifndef EMULATOR_H_ #define EMULATOR_H_ +#include <vector> + +#include "value.h" + +class inst_loader; + class emulator { +public: + emulator( + inst_loader * loader, + int num_temp_regs, + int num_const_regs, + int num_out_regs); + + + void run(); + void set_constants(float value); + value * get_value(register_address addr); + void set_value( + register_address addr, + value * val); + value * get_output_value(int index); + private: - inst_loader loader; - vector<reg> temp_regs; - vector<reg> out_regs; + unsigned int calc_reg_index( + unsigned int index, + enum swizzle swz); + + inst_loader * m_loader; + std::vector<value *> m_temp_regs; + std::vector<float_value *> m_const_regs; + std::vector<value *> m_out_regs; }; -#endif //EMULATOR_H_ +#endif //EMULATOR_H |