This is the mail archive of the binutils@sources.redhat.com 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]

Incorrect code generated with m68k-elf-as


I have a problem when assembling m68k-elf code.
The code that causes the problem is pretty long
(about 20k), it can be found here:

http://www.laseranimation.com/peter/error6.s

When assembling this with "m68k-elf-as -a error6.s"
everything seems to be ok.
But without listing the generated code is incorrect.

A diff of a dump of the a.out files:

@@ -162,8 +162,8 @@
  20c:  33c0 0000 0000  movew %d0,0 <_a5625850_>
  212:  70ff            moveq #-1,%d0
  214:  33c0 0000 0000  movew %d0,0 <_a5625850_>
- 21a:  600c            bras 228 <_a5626516_+0x5e>
- 21c:  4879 0000 0000  pea 0 <_a5625850_>
+ 21a:  6000 4879       braw 4a95 <_a5626102_+0x3e99>
+ 21e:  0000 0000       orib #0,%d0
  222:  4eb9 0000 0000  jsr 0 <_a5625850_>
  228:  4e5e            unlk %fp
  22a:  4e75            rts
@@ -312,8 +312,7 @@
  416:  4a79 0000 0000  tstw 0 <_a5625850_>
  41c:  673c            beqs 45a <_a5627150_+0x4c>
  41e:  4a80            tstl %d0
- 420:  660a            bnes 42c <_a5627150_+0x1e>
- 422:  4200            clrb %d0
+ 420:  6600 4200       bnew 4622 <_a5626102_+0x3a26>
  424:  13c0 0000 0000  moveb %d0,0 <_a5625850_>
  42a:  6018            bras 444 <_a5627150_+0x36>
  42c:  2f00            movel %d0,%sp@-

The branches at 21a and 420 are messed (incorrect
offset 0).

Peter Jakubek
pjak@snafu.de



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