Welcome, Guest. Please login or register.

Author Topic: Coldfire status  (Read 8523 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline MskoDestny

  • Sr. Member
  • ****
  • Join Date: Oct 2004
  • Posts: 363
    • Show all replies
    • http://www.retrodev.com
Re: Coldfire status
« on: May 13, 2006, 06:23:23 PM »
Quote

platon42 wrote:
And no, there is *no* way to find out if a word in a data or code section is code or data -- other than doing a full CPU emulation and stepping through the code that's reached

That's not completely true. Unless part of the code is compressed, encrypted or generated on the fly you can theoretically start scanning at the entry point and just follow all the possible branches. Jump tables are a little tricky in part because it can be difficult to figure out the bounds of the table; however, with the 68K family it's a little easier as disassembling random data tends to produce illegal instructions within a short period of time. It would be difficult to make it fool-proof, but you could probably get pretty close, especially on code compiled from something higher level than assembly.
 

Offline MskoDestny

  • Sr. Member
  • ****
  • Join Date: Oct 2004
  • Posts: 363
    • Show all replies
    • http://www.retrodev.com
Re: Coldfire status
« Reply #1 on: May 13, 2006, 06:40:20 PM »
Quote

Piru wrote:
Quote
Oh, BTW I had a though about how to provide a full CPU emulation on the Coldfire : we can use the trace mode and check if the instruction is compatible : when it is compatible you exit the exception and let the CF do the work when it is not you execute the emulated code.

I tried this approach once on 68060@64. The result was slower than 68000@7 (constant exceptions really kill the performance it seems, must be the stack memory accesses).

Maybe coldfire 5282 exceptions aren't as slow as 68060, though?

It's the stack memory accesses, plus flushing the pipeline, plush thrashing the instruction cache. Given that faster processors generally have longer pipelines I doubt the situation would be any better on Coldfire; it would most likely be worse.