ancient ARM cpus

Niels Möller nisse at lysator.liu.se
Sun Nov 15 07:01:01 UTC 2015


Martin Husemann <martin at duskware.de> writes:

> --- mpn/arm/aorslsh1_n.asm.orig	2014-03-25 14:37:55.000000000 +0000
> +++ mpn/arm/aorslsh1_n.asm
> @@ -163,5 +163,8 @@ L(rt1):	mov	r14, r12
>  	REVCY(r12)
>  L(rt0):	RETVAL(	r14)
>  	pop	{r4-r10r11, r14}
> -	bx	r14
> +ifdef(`ARM_THUMB_MODE',
> +`	bx	r14
> +',`	mov	pc, r14
> +')
>  EPILOGUE()

Where and how do you set ARM_THUMB_MODE? If I understand these things
correctly, the right check is not whether or not gmp is compiled in
thumb mode, but whether or not it's going to run on a machine where
thumb code might call it. Which I guess needs a configure option, since
it is difficult for configure to guess correctly and automatically.

What's the corresponding gcc flag to avoid using bx in compiler
generated code?

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-bugs mailing list