diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/or1k.opc | 2 | ||||
-rw-r--r-- | cpu/or1kcommon.cpu | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cpu/or1k.opc b/cpu/or1k.opc index 5d20a1f..748187e 100644 --- a/cpu/or1k.opc +++ b/cpu/or1k.opc @@ -38,7 +38,7 @@ #undef CGEN_DIS_HASH_SIZE #define CGEN_DIS_HASH_SIZE 256 #undef CGEN_DIS_HASH -#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2) +#define CGEN_DIS_HASH(buffer, value) ((value >> 26) & 0xff) /* Check applicability of instructions against machines. */ #define CGEN_VALIDATE_INSN_SUPPORTED diff --git a/cpu/or1kcommon.cpu b/cpu/or1kcommon.cpu index 9f102c9..7f91954 100644 --- a/cpu/or1kcommon.cpu +++ b/cpu/or1kcommon.cpu @@ -243,6 +243,8 @@ (.unsplice (.map (.pmacro (n) (.splice SYS (.sym "ESR" n) (.add n #x40) (.str "Exception supervision register " n))) (.iota #x10))) + (SYS COREID #x080 "Core identifier register") + (SYS NUMCORES #x081 "Number of cores register") (.unsplice (.map (.pmacro (n) (.splice SYS (.sym "GPR" n) (.add n #x400) (.str "General purpose register " n))) (.iota #x200))) |