-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[newlib/libgloss] Add support for RF16 configurations #231
Comments
Not sure if we can use the nsim's gnu Host I/O for RF16. We need to investigate more. |
Supporting RF16 with existing GNU host I/O for nsim is not possible as the syscalls are using unsupported registers. For example: #define _naked_syscall2(__res, name, a, b) \
__asm__ __volatile__ ("mov r1, %3\n\t" \
"mov r0, %2\n\t" \
"mov r8, %1\n\t" \
SYSCALL \
"mov %0, r0" \
: "=r" (__res) \
: "i" (SYS_##name), \
"r" ((long)a), \
"r" ((long)b) \
: "cc", "r0", "r1", "r8"); \
if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
errno = -__res; \
__res = -1; \
} As you can see |
AFAIKR, for reduced regfile configs, syscall number was in r4 - please check the ABI doc |
Having the new mwdt hostlink libgloss may be a solution. |
Indeed, foss-for-synopsys-dwc-arc-processors/newlib#14 should fix this. |
Should be fixed in https://github.com/foss-for-synopsys-dwc-arc-processors/newlib/tree/arc-2021.03.
|
Currently we have this:
$ arc-elf32-gcc -mcpu=em_mini -Os --specs=nsim.specs test.c .../bin/../lib/gcc/arc-elf32/9.2.1/../../../../arc-elf32/bin/ld: error: a.out: cannot mix rf16 with full register set .../bin/../lib/gcc/arc-elf32/9.2.1/../../../../arc-elf32/lib/em_mini/libnsim.a(nsim-syscalls.o) .../bin/../lib/gcc/arc-elf32/9.2.1/../../../../arc-elf32/bin/ld: failed to merge target specific data of file .../bin/../lib/gcc/arc-elf32/9.2.1/../../../../arc-elf32/lib/em_mini/libnsim.a(nsim-syscalls.o)
@claziss @shahab-vahedi who's interested in getting this done at some point? :)
We need this to have an ability to add RF16 (
-mcpu=em_mini
) configuration in automated testing, i.e. have an ability to run a simple "hello world" application in nSIM similarly to what we do for other configurations.In particular we do it in automated flow as a part of release (as well as engineering build & RCs) publishing. So that will help us to be sure stuff builds and runs on RF16 configs, instead of getting unexpected reports like #216.
The text was updated successfully, but these errors were encountered: