6da525704d
The following are the compile error that reported by GreenHills compiler: "/mnt/yang/qixinwei_commit/nuttx/include/arch/syscall.h", line 156 (col. 17): error #2036-D: cannot allocate "reg0" to specified caller-saved register "/mnt/yang/qixinwei_commit/nuttx/include/arch/syscall.h", line 157 (col. 17): error #2036-D: cannot allocate "reg1" to specified caller-saved register Then we fix this greenhills compilation error by explicitly specifying the registers in the clobber list in the inline assembly code. This fix is successful in compiling on the nuttx/boards/arm/mps/mps2-an500/configs/nsh platform and passes the ostest test. However, if we keep the implementation the same for both the default and Greenhills compilers, the default compiler will report the following two issues: 1. the "sys_call6" function will report compile error when compiling on "./vendor/qemu/boards/smartspeaker/configs/smartspeaker-knsh" platform, the detailed error info: CC: proxies/PROXY_mq_getattr.c In file included from /home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/sys/syscall.h:35, from /home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/syscall.h:30, from proxies/PROXY_mmap.c:5: In function 'sys_call6', inlined from 'mmap' at proxies/PROXY_mmap.c:9:22: /home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/arch/syscall.h:297:3: error: 'asm' operand has impossible constraints 297 | __asm__ __volatile__ | ^~~~~~~ 2. when running on qemu-armv7-a platform, the modification to "smh_call()" function will make the system fail to boot up, so we need to keep the default compiler implementation and greenhills compiler implementation separate Signed-off-by: fangxinyong <fangxinyong@xiaomi.com> (cherry picked from commit cb48b749b1c9cad8cfb96bff7c5e9b6ebf20fc8a) |
||
---|---|---|
.. | ||
a1x | ||
am335x | ||
arm | ||
armv6-m | ||
armv7-a | ||
armv7-m | ||
armv7-r | ||
armv8-m | ||
armv8-r | ||
at32 | ||
c5471 | ||
cxd32xx | ||
cxd56xx | ||
dm320 | ||
efm32 | ||
eoss3 | ||
fvp-v8r-aarch32 | ||
gd32f4 | ||
goldfish | ||
imx1 | ||
imx6 | ||
imxrt | ||
kinetis | ||
kl | ||
lc823450 | ||
lpc17xx_40xx | ||
lpc31xx | ||
lpc43xx | ||
lpc54xx | ||
lpc214x | ||
lpc2378 | ||
max326xx | ||
moxart | ||
mps | ||
mx8mp | ||
nrf52 | ||
nrf53 | ||
nrf91 | ||
nuc1xx | ||
phy62xx | ||
qemu | ||
rp2040 | ||
s32k1xx | ||
s32k3xx | ||
sam34 | ||
sama5 | ||
samd2l2 | ||
samd5e5 | ||
samv7 | ||
stm32 | ||
stm32f0l0g0 | ||
stm32f7 | ||
stm32h7 | ||
stm32l4 | ||
stm32l5 | ||
stm32u5 | ||
stm32wb | ||
stm32wl5 | ||
str71x | ||
tiva | ||
tlsr82 | ||
tms570 | ||
xmc4 | ||
.gitignore | ||
arch.h | ||
elf.h | ||
inttypes.h | ||
irq.h | ||
limits.h | ||
setjmp.h | ||
spinlock.h | ||
stdarg.h | ||
syscall.h | ||
types.h |