Require ISAs to specify ELF machine id
MODIFY
src/isainfo.h
src/isainfo.h
#include <QMap>
#include <QString>
+#include "elfio/elf_types.hpp"
+
namespace Ripes {
/// Currently supported ISAs
@@ -22,6 +24,8 @@ public:
virtual int spReg() const { return -1; } // Stack pointer
virtual int gpReg() const { return -1; } // Global pointer
+ virtual unsigned elfMachineId() const = 0;
+
protected:
ISAInfoBase() {}
};
@@ -104,5 +108,6 @@ public:
unsigned int bits() const override { return 32; }
int spReg() const override { return 2; }
int gpReg() const override { return 3; }
+ unsigned elfMachineId() const override { return EM_RISCV; }
};
} // namespace Ripes

Require ISAs to specify ELF machine id