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: PATCH: Tidy up code in elf32-arm.c


Hi Nick,

On 17.08.2008 22:47, Nick Clifton wrote:
Hi Guys,

  Whilst looking into the ARM interworking problems I had cause to
  note that the code in elf32-arm.c hand become rather untidy, so I am
  checking in the attached patch to spruce it up.  The patch does not
  fix any bugs (or introduce any new ones!).


Are you sure about the comment reformatting below?
In the code fragment on the left, shouldn't "b func" be the last instruction and "__func_back_to_thumb" be moved the right side (after .arm) ?


Christophe.

*************** static const insn32 a2t3p_bx_r12_insn =
*** 3845,3863 ****

/* Thumb->ARM: Thumb->(non-interworking aware) ARM

!    .thumb                               .thumb
!    .align 2                             .align 2
!    __func_from_thumb:              __func_from_thumb:
!    bx pc                                push {r6, lr}
!    nop                                  ldr  r6, __func_addr
!    .arm                                         mov  lr, pc
!    __func_change_to_arm:                        bx   r6
!    b func                       .arm
!    __func_back_to_thumb:
!    ldmia r13! {r6, lr}
!    bx    lr
!    __func_addr:
!    .word        func  */

  #define THUMB2ARM_GLUE_SIZE 8
  static const insn16 t2a1_bx_pc_insn = 0x4778;
--- 3845,3862 ----

/* Thumb->ARM: Thumb->(non-interworking aware) ARM

!      .thumb                             .thumb
!      .align 2                           .align 2
!  __func_from_thumb:                 __func_from_thumb:
!      bx pc                              push {r6, lr}
!      nop                                ldr  r6, __func_addr
!      .arm                               mov  lr, pc
!      b func                             bx   r6
!  ;; back_to_thumb                       .arm
!      ldmia r13! {r6, lr}                ldmia r13! {r6, lr}
!      bx    lr  				bx    lr
!                                     __func_addr:
!                                         .word        func  */

  #define THUMB2ARM_GLUE_SIZE 8
  static const insn16 t2a1_bx_pc_insn = 0x4778;


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