Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: 68k optimizations  (Read 816 times)

0 Members and 1 Guest are viewing this topic.

Offline AmigaMance

68k optimizations
« on: November 11, 2005, 04:07:21 PM »
Hi.
 This is not a question about OS development, but i felt that only the experts here, can answer it. I am not a developer. :roll:
 Using the JumpGate patcher from Aminet, i discovered that many executables, libraries, devices etc. contains TONS of SW+CLR+SW and NOP instructions. Not just old files compiled for the 68000, but also "new", 040 optimized files!
 JumpGate replace the SW+CLR+SW with ANDI.L and the NOP with LEA (An). The second conversion is faster only if you have a 040+ cpu, as the guide states. ( I have a 68040)
 So far, i have use this utility to optimize many system files and i haven't encounter a problem, atm. Oh, BSR->BRA type of conversions, seems to be safe, too.
 Don't try this at home, as other optimizations are proven to be dangerous!! I always keep backup files.

 So, i have 2 questions about this:
- Are these optimizations always faster, or there are exceptions to this? I don't know a standard way to detect small changes in speed. (maybe you know one, btw)
- Are there any potential problems that i should know of?
A1200 PPC user.
 

Offline SamuraiCrow

Re: 68k optimizations
« Reply #1 on: November 11, 2005, 04:28:08 PM »
The main reason a NOP can make an executable faster is that it can allow a loop to be aligned to a row of cache memory in the code cache.  This allows the entire cache to be filled with code from the loop and speed things up substantially.  The code cache on an '040 is 4k and '060 is even bigger.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: 68k optimizations
« Reply #2 on: November 11, 2005, 04:47:00 PM »