Beginnings of ipdom support.

This commit is contained in:
chad 2014-09-08 18:40:29 -04:00
parent 466ac4e7cc
commit 7529be422b
3 changed files with 14 additions and 1 deletions

View file

@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include <stack>
#include "types.h"
#include "archdef.h"
@ -47,6 +48,12 @@ namespace Harp {
#endif
};
// Entry in the IPDOM Stack
struct DomStackEntry {
std::vector<bool> tmask;
Word pc;
};
class Core {
public:
Core(const ArchDef &a, Decoder &d, MemoryUnit &mem, Word id=0);
@ -67,6 +74,9 @@ namespace Harp {
std::vector<std::vector<Reg<Word> > > reg;
std::vector<std::vector<Reg<bool> > > pred;
std::vector<bool> tmask;
std::stack<DomStackEntry> domStack;
std::vector<Word> shadowReg;
std::vector<bool> shadowPReg;

View file

@ -30,7 +30,8 @@ namespace Harp {
JALI, JALR, JMPI, JMPR, CLONE, JALIS, JALRS,
JMPRT, LD, ST, LDI, RTOP, ANDP, ORP, XORP, NOTP, ISNEG,
ISZERO, HALT, TRAP, JMPRU, SKEP, RETI, TLBRM,
ITOF, FTOI, FADD, FSUB, FMUL, FDIV, FNEG, WSPAWN };
ITOF, FTOI, FADD, FSUB, FMUL, FDIV, FNEG, WSPAWN,
SPLIT, JOIN };
enum ArgClass {
AC_NONE, AC_2REG, AC_2IMM, AC_3REG, AC_3PREG, AC_3IMM, AC_3REGSRC,
AC_1IMM, AC_1REG, AC_3IMMSRC, AC_PREG_REG, AC_2PREG, AC_2REGSRC

View file

@ -81,6 +81,8 @@ Instruction::InstTableEntry Instruction::instTable[] = {
{"fdiv", false, false, false, false, AC_3REG, ITYPE_FPDIV },
{"fneg", false, false, false, false, AC_2REG, ITYPE_FPBASIC },
{"wspawn", false, false, true, false, AC_2REGSRC, ITYPE_NULL },
{"split", false, false, true, false, AC_NONE, ITYPE_NULL },
{"join", false, false, true, false, AC_NONE, ITYPE_NULL },
{NULL,false,false,false,false,AC_NONE,ITYPE_NULL}/////// End of table.
};