Re: [arm-gnu] thumb code calling arm subroutine causes undefined insn exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] thumb code calling arm subroutine causes undefined insn exception



On Wednesday 28 April 2010 10:57:54 am Richard Earnshaw wrote:
> .thumb_func shouldn't be needed these days.

> However, you probably want to add a
> 	.type thumb_start, %function
> directive.

Interesting. Could you give an example, I'm not quite getting how this works.

Is it a matter of

	.type thumb_start, %my_thumb_func

in the source file, and then

	.code 32
	ldr r0, =my_thumb_func
	bx r0

	.code 16
my_thumb_func:
	...

? Also, if I'm jumping back to ARM code in the file, am I correct in using the 
.align 4 before the ARM code to ensure that I'm on a dword address boundary?

A.