arm gcc can not compile smc instruction with armv6

OP #1172801
Hi,

  arm gcc not able to compile smc instruction when -march=armv6 but it
compiles correctly when -march=armv7a is it a bug in gcc


arm-none-linux-gnueabi-gcc -Wp,-MD,/home/anilpaul/module/.secure.o.d
-nostdinc -isystem
/home/anilpaul/arm-2006q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.1/in 
clude
-D__KERNEL__ -Iinclude  -include include/linux/autoconf.h
-mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Os -fno-omit-frame-pointer -mapcs
-mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork
-D__LINUX_ARM_ARCH__=6  -march=armv6 -mtune=strongarm  -msoft-float
-Uarm -fno-omit-frame-pointer -fno-optimize-sibling-calls -g
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(secure)"
-D"KBUILD_MODNAME=KBUILD_STR(secure)" -c -o
/home/anilpaul/module/secure.o /home/anilpaul/module/secure.c
/tmp/ccwoKXUg.s: Assembler messages:
/tmp/ccwoKXUg.s:46: Error: selected processor does not support `smc 0'
make[2]: *** [/home/anilpaul/module/secure.o] Error 1
make[1]: *** [_module_/home/anilpaul/module] Error 2
make[1]: Leaving directory `/home/anilpaul/linux-2.6.19'
make: *** [default] Error 2

thanks
--Anil Paul
#1172802
It is not a bug with gcc... it is just that you are not using the right
flag use -march=armv6z.

Regards,
Sundar.

Anil Thoppil wrote:
> Hi,
>
>   arm gcc not able to compile smc instruction when -march=armv6 but it
> compiles correctly when -march=armv7a is it a bug in gcc
>
>
> arm-none-linux-gnueabi-gcc -Wp,-MD,/home/anilpaul/module/.secure.o.d
> -nostdinc -isystem
> /home/anilpaul/arm-2006q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.1/in clude
> -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h
> -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
> -fno-strict-aliasing -fno-common -Os -fno-omit-frame-pointer -mapcs
> -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork
> -D__LINUX_ARM_ARCH__=6  -march=armv6 -mtune=strongarm  -msoft-float
> -Uarm -fno-omit-frame-pointer -fno-optimize-sibling-calls -g
> -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
> -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(secure)"
> -D"KBUILD_MODNAME=KBUILD_STR(secure)" -c -o
> /home/anilpaul/module/secure.o /home/anilpaul/module/secure.c
> /tmp/ccwoKXUg.s: Assembler messages:
> /tmp/ccwoKXUg.s:46: Error: selected processor does not support `smc 0'
> make[2]: *** [/home/anilpaul/module/secure.o] Error 1
> make[1]: *** [_module_/home/anilpaul/module] Error 2
> make[1]: Leaving directory `/home/anilpaul/linux-2.6.19'
> make: *** [default] Error 2
>
> thanks
> --Anil Paul

Reply

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.