This is the mail archive of the 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: m68k reloc types

Roman Zippel <> writes:

> It's not the same, gcc can use it to access local variables without 
> creating a got entry. m68k currently doesn't do it, but it would be nice, 
> if we could. Simply compare the generated code for something like 
> "puts("foo");" for i386 and m68k.

For strings or other read-only data you can just use pc-relative
addressing anyway.

> Anyway, the cost of a memory indirect accesses depends on the cpu, 
> 680[46]0 would benefit from this.

Are you sure about that?  AFAIK especially on the 040 and 060 the memory
indirect addressing modes are slower than going through a temporary
register.  For example on the 68040, for `add Rn,([bd,BR,Xn])' calculating
the destination address takes a whopping 10 cycles and additionally 9
cycles to execute the insn, whereas for simple addressing modes at most 2
cycles are needed for both.  Thus memory indirect is a major loss.  On the
060 the difference is much smaller, but still significant.


Andreas Schwab, SuSE Labs,
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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