This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: [PATCH -tip 3/6 V4.1] x86: instruction decorder API


Jim Keniston wrote:
> On Tue, 2009-04-21 at 20:17 -0400, Masami Hiramatsu wrote:
> ...
>> Hi Peter and Jim,
>>
>> Now what I'm doing is making opcode tables like this.
>>
>> Table: 1-byte opcode
>> Alias: none
>> 00: ADD Eb,Gb
>> 01: ADD Ev,Gv
>> 02: ADD Gb,Eb
>> 03: ADD Gv,Ev
>> 04: ADD AL,Ib
>> 05: ADD rAX,Iz
>> 06: PUSH ES (i64)
>> 07: POP ES (i64)
>> 08: OR Eb,Gb
>> 09: OR Ev,Gv
>> 0a: OR Gb,Eb
>> 0b: OR Gv,Ev
>> 0c: OR AL,Ib
>> 0d: OR rAX,Iz
>> 0e: PUSH CS
>> 0f: 2-byte escape
>> ...
> 
> We want to keep this info easy to parse. (Who knows how it might be
> used, and by whom?)  Your format seems to be
> 	opcode: mnemonic [comma,separated,operands] [(extra_info)]
> which is fine if you stick to it... but your entry for 0f doesn't match
> that.

Sure, it was just based on the original opcode map.
Maybe, we can have something special expressions for that.
e.g.
0f: ESC # 2-byte escape

> Also, something like
> 	+ extra_info
> would be easier to parse (using, say, awk) than
> 	(extra_info)

Hmm, maybe, parser can handle "(extra_info)" as a solid keyword.
so let's define actual format.

<opcode maps>
Table: table-name
Referrer: escamed-name
opcode: mnemonic|Grp [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
opcode: ESC # escaped-name

<group maps>
reg: mnemonic ...


Thank you,


-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



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