Re: [hatari-devel] External disassembler and FPU instructions

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 4/18/19 3:34 PM, Toni Wilen wrote:
On Mittwoch, 17. April 2019 20:15:42 CEST Eero Tamminen wrote:
lower-case opcode names

IIRC it is not only a problem of upper/lowercase. The internal disassembler
takes (most of) the opcode names from table68k. These are not the real
instruction names in all cases (MVPMR, EORSR for example).

I have been slowly improving it recently. Most weird opcode names are
already gone but some still remains (like MVPMR).

I can add lower/uppercase (and other) options if needed.

Great!

Btw. have you ever considered adding profiling functionality from
Hatari to WinUAE?

Most users really don't need the callchain cost propagation and
callgraph functionality which complicates it a lot.

Without that, it's pretty simple, just:
- allocate struct array which size matches emulated memory size
  (actually half of it as instructions are at even addresses) [1]
- on each instruction increment costs for item at PC address
- at end calculate some overall statistics

This allows showing cost annotated disassembly, from which one
can deduct code flows at branches.  Some sorting of the data
(indexes for it), allows showing which parts of the code executed
most instructions, cost most cycles, had most cache misses etc.


	- Eero

[1] on modern OSes, malloc/calloc results don't use any physical
memory except few bytes for each (4K...2MB?) memory page that kernel
needs for bookkeeping (until program dirties given page), so
allocating really large arrays which are mostly unused is no
problem.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/