This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: QUERY : ARM inline code in Thumb file?
- From: Michael Meissner <gnu at the-meissners dot org>
- To: "Aaron P. D'Souza" <adsouzp at netscape dot net>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Fri, 29 Aug 2008 16:26:47 -0400
- Subject: Re: QUERY : ARM inline code in Thumb file?
- References: <48B58864.2060304@netscape.net>
On Wed, Aug 27, 2008 at 10:31:24PM +0530, Aaron P. D'Souza wrote:
> hello:
>
> one small question regarding use of ARM inline assembly code in a
> C file that has been compiled for Thumb mode.
>
> is it possible to use ARM assembly code from within a C file that
> has been compiled for Thumb and Thumb interworking?
>
> how this is done is described on this page:
> http://www.devrs.com/gba/files/asmc.txt
>
> i have a C file that has been compiled for Thumb mode. in it, i am
> using ARM inline assembly code. apparently, GCC issues no error
> message but forcibly converts the ARM code into Thumb code.
>
> i think that GCC requires an entire file to be in either Thumb mode
> or ARM mode, but i am not sure. is that true?
I don't believe ARM has the ability right now to compile some functions in
thumb and some in normal ARM mode. The MIPS port some time ago, added the
ability to compile some functions in 16-bit mode (similar to the thumb mode)
and some in 32-bit mdoe. Recently, I and Karthik Kumar added more general
infrastructure work to the compiler to be able to specify target specific
operands on a per-function basis if the backend has added the support. Right
now, the i386/x86_64 backend has this support, and I'm working on the PowerPC
support for it.
--
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org