mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
or1k: Add support for numcores and coreid sprs
These are needed when running GCC tests for newlib toolchains built with
multicore support. Without these SPRs we get the following warnings
when running tests.
spawn or1k-elf-run ./20000112-1.exe^M
WARNING: l.mfspr with invalid SPR address 0x80^M
WARNING: l.mfspr with invalid SPR address 0x81^M
WARNING: l.mfspr with invalid SPR address 0x81^M
WARNING: l.mfspr with invalid SPR address 0x81^M
Support is added by defining the SPRs in the cgen machine definition and
regenerating the machine code. In or1k/or1k.c we initialize NUMCORES to
1 and COREID to 0 as the sim has only one CPU. In or1k/traps.c we allow
returning the NUMCORES and COREID spr values in the mfspr function.
Signed-off-by: Stafford Horne <shorne@gmail.com>
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user