Subject: Re: Revision K strongarms ...
To: Philip Blundell <pb@nexus.co.uk>
From: None <kim@pvv.ntnu.no>
List: port-arm32
Date: 05/07/1998 15:59:55
> That will still kill you if the NOP falls in the middle of, say, a jump table. 
> GCC often compiles a `switch' on integer values into something of the form
> 
> 	ldr pc, [pc, r0, lsl #2]
> 	b	L1
> 	.word	L2
> 	.word	L3
> 	.word	L4

I see. I didn't know this.

There is still the possibility of always assembling LDM as
LDM NOP, and let the linker change it to NOP LDM if the LDM
happens to lie last on a page.

The overhead will then be less than the time spent executing LDMs.
How much is that? Probably still acceptable.

Kim0

(It should be possible to bypasses the jumtables to, if one
 only put NOPs when there is a LDM at the end of a page, and
 keep track of all of them for address calculations.
 This sounds complex, and will probably be tiresome to implement.)