This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: RFC: Is it OK to disassemble instructions twice ?


Hi Nick, Florian,

> 
> > Or maybe you could add a per-target maximum instruction length and do
> > the double-disassembly only if there is a relocation within the
> > maximum instruction length window.
> 
> That would work.  The code at the moment does limit the double
> disassembly to only when relocs are associated with the section being
> disassembled, and then only if the next reloc is not targetting the start of the
> instruction that is about to be disassembled.  It is a good suggestion though,
> so I will have a go at implementing it.
> 

But this means that on Arm we'd still take the double hit for no reason. The maximum instruction length
will have to be 32 due to Arm mode, so when disassembling Thumb code you'll hit a relocation in the middle of
this maximum quite often.  If the maximum is reconfigurable then you'd be back where you started anyway since
every insn could potentially be a different length than the next.

So I'd say giving the target an opt-out of this would also be desirable. 

Cheers,
Tamar

> Cheers
>   Nick
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]