This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

e500 architecture and branch instructions


Hi,

I get some issue with branch instructions with the e500 architecture.

I wrote this code.
===============================
    .section .text,"ax",@progbits

    nop
    nop
    nop
    bl 4
    nop
    b 4
    nop
    nop
    bla 4
===============================
When I dump the object code I get that.

asm.o:     file format elf32-powerpc


Disassembly of section .text:

00000000 <.text>:
   0:    60 00 00 00     nop
   4:    60 00 00 00     nop
   8:    60 00 00 00     nop
   c:    48 00 00 05     bl      0x10
  10:    60 00 00 00     nop
  14:    48 00 00 04     b       0x18
  18:    60 00 00 00     nop
  1c:    60 00 00 00     nop
  20:    48 00 00 07     bla     0x4
===============================

In EREF: A Reference for Freescale Book E and the e500 Core b and bl
are identical in jump functionality. But the compiled code is
different and the jump is done to bad place.

Thanks for the help,
Claude


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