[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-mdb-discuss
Subject:    [mdb-discuss] Sparc disassembly modes
From:       "Jason King" <jason () ansipunx ! net>
Date:       2007-10-11 4:29:30
Message-ID: fa9202c30710102129h3a602e6hd4c5387390c20ac9 () mail ! gmail ! com
[Download RAW message or body]

Is there any value to continue to selectively allow the disassembly of
the VIS/VIS2 instructions (versus always disassembling them in v9
mode)?

As I was looking at adding in support for the Olympus/SPARCVI
instructions (fused + suspend + sleep) as well as wrhpr/rdhpr/sir,
trying to figure out when they should be allowed to be disassembled
(vs. returning invalid) became a real headache.

Right now, there's potentially two (possible three) additional modes
(the OPL -- might need two separate modes for -B and -C -- and the
hyperprivleged instructions) beyond the current 3 (v8, v9, vis/vis2)
that would need to be added.  It also then requires additional logic
to determine when to turn on the flags.  As it is, the logic to map
the ELF flags to disassembly flags is somewhat complicated (see
usr/src/cmd/dis/dis_main.c:463).  The new instructions would
complicate it further as it would require having to process the
.SUNW_cap section of an elf object, in addition to the current code.

In some side discussions, it was pointed out that a CPU doesn't care
what the various flags in the ELF headers and sections say about the
instructions, so might as well disassemble every known instruction.

Since there is a small amount of instruction reuse between v8 & v9,
what I'm proposing is simply having two modes -- v8 & v9.   With v9,
all the v9 instructions would be disassembled
(vis/vis2/hyperprivleged/fused/etc.).

Can anyone see any issues with this?
_______________________________________________
mdb-discuss mailing list
mdb-discuss@opensolaris.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic