Re: [try 2nd 4/8] Displaced stepping for Thumb 16-bit insn

Ulrich Weigand
2011-05-17T17:20:35Z

Yao Qi wrote:

> > Have you looked at how the ARM case does it? There, we still have just
> > a single POP { r0, ..., rN } that pops the right number of registers,
> > and then the cleanup function (cleanup_block_load_pc) reshuffles them.
> > It seems to me we could do the same (and actually use the same cleanup
> > function) for the Thumb case too ...
>
> Sure, we can reuse that for Thumb case here. In this case, when
> register list is not full, we could optimize it a little bit like what I
> did in my last patch. However, it is a separate issue, and can be
> addressed separately.

OK, sounds good.

> Support displaced stepping for Thumb 16-bit insns.
> * arm-tdep.c (THUMB_NOP) Define.
> (thumb_copy_unmodified_16bit): New.
> (thumb_copy_b, thumb_copy_bx_blx_reg): New.
> (thumb_copy_alu_reg): New.
> (arm_copy_svc): Move some common code to ...
> (install_svc): ... here. New.
> (thumb_copy_svc): New.
> (install_pc_relative): New.
> (thumb_copy_pc_relative_16bit): New.
> (thumb_decode_pc_relative_16bit): New.
> (thumb_copy_16bit_ldr_literal): New.
> (thumb_copy_cbnz_cbz): New.
> (cleanup_pop_pc_16bit_all): New.
> (thumb_copy_pop_pc_16bit): New.
> (thumb_process_displaced_16bit_insn): New.
> (thumb_process_displaced_32bit_insn): New.
> (thumb_process_displaced_insn): process thumb instruction.

I didn't find anything else :-) Thanks for your patience in working
through all those iterations!

This version is OK.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com