The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Farabi on August 08, 2008, 12:43:28 PM

Title: SSE Opcode Help File
Post by: Farabi on August 08, 2008, 12:43:28 PM
I Did remember I did have a program explaining about "newest" instruction like SSE or SSE 2 or something. Anyone remember?
Title: Re: SSE Opcode Help File
Post by: dsouza123 on August 10, 2008, 02:44:02 AM
Google 26568.pdf from www.amd.com also instruction_tables.pdf from www.agner.org
together you will get info on each instruction and a list of which are in SSE/SSE2.
Title: Re: SSE Opcode Help File
Post by: PBrennick on August 10, 2008, 03:36:02 AM
Farabi,

The OPcode database project contains limitted information about such instructions - SSE, SSE2 or SSE3, a brief description of what each instruction does. I am thinking of re-doing that project as a listview, but http://www.masm32.com/board/index.php?topic=6015.0 (http://www.masm32.com/board/index.php?topic=6015.0) will get you what is already done.

-- Paul
Title: Re: SSE Opcode Help File
Post by: jj2007 on August 10, 2008, 10:26:58 AM
Quote from: PBrennick on August 10, 2008, 03:36:02 AM
The OPcode database project contains limitted information about such instructions - SSE, SSE2 or SSE3, a brief description of what each instruction does.

Fantastic database! I have just converted it to my own "cardfile" - attach all files to some folder, then drag opcodes.jjn over jj_notes.exe
The tool allows better searches, e.g. type add flo, then TAB, then cursor down to scroll all records containing add and float.

EDIT(1): New attachment with minor change: Launching the jj_notes.exe loads the database if it is the only jjn file in that folder. Dragging is no longer needed.
EDIT(2): New attachment with small internal change: Field names are no longer searchable; try e.g. mul /m8

[attachment deleted by admin]
Title: Re: SSE Opcode Help File
Post by: PBrennick on August 10, 2008, 01:34:35 PM
Hi JJ,
Thank you for your nice comment. I put a tremendous amount of work into creating the database but hardly no effort at all into the program as the program was just an example of how it could be used. I will restructure the database into a table, though, and use a listview. I was anxious to see what you have done but I just get file not found messages when the program tries to start and the program immediately exits. The error is unrevealing so I have no idea what is missing.

-- Paul
Title: Re: SSE Opcode Help File
Post by: jj2007 on August 10, 2008, 01:44:24 PM
Hi Paul,
All three files need to be extracted to some folder; then drag opcodes.jjn over jj_notes.exe
Normally that should work; it does not use the registry, so no de-installation necessary. Keep me posted, please.
Title: Re: SSE Opcode Help File
Post by: RuiLoureiro on August 10, 2008, 08:54:29 PM
Quote from: jj2007 on August 10, 2008, 01:44:24 PM
Hi Paul,
All three files need to be extracted to some folder; then drag opcodes.jjn over jj_notes.exe
Hi jj2007,
                 I tried to search    SUB.   It  hasnt that  opcode.
                 Why ? Did i do some mistake ?
Rui
Title: Re: SSE Opcode Help File
Post by: PBrennick on August 10, 2008, 10:09:22 PM
There are 10 entries for SUB.

As far as converting the database to an ASCIIZ delimitted database goes, it is done. I am now formatting the fields so that each column is the same size so that positioning can me mathematically computed. It is no small job, but it is progressing. I am also changing the similar opcodes so that they all have their own entry. As follows:


    db  "JAE/JNB/JNC", 0, "0F 83 iv", 0, "rel", 0, "Jump if above or equal (CF=0)", 0, "86", 0


becomes:

    db  "JAE", 0, "0F 83 iv", 0, "rel", 0, "Jump if above or equal (CF=0)", 0, "86", 0
    db  "JNB", 0, "0F 83 iv", 0, "rel", 0, "Jump if above or equal (CF=0)", 0, "86", 0
    db  "JNC", 0, "0F 83 iv", 0, "rel", 0, "Jump if above or equal (CF=0)", 0, "86", 0


It will add many more entries, but searching and sorting will be easier.

-- Paul
Title: Re: SSE Opcode Help File
Post by: jj2007 on August 10, 2008, 10:26:46 PM
Quote from: RuiLoureiro on August 10, 2008, 08:54:29 PM
Quote from: jj2007 on August 10, 2008, 01:44:24 PM
Hi Paul,
All three files need to be extracted to some folder; then drag opcodes.jjn over jj_notes.exe
Hi jj2007,
                 I tried to search    SUB.   It  hasnt that  opcode.
                 Why ? Did i do some mistake ?
Rui

The search box is in the lower left corner, to the right of Exit. It should show 74 matches for sub, 62 for Sub and 53 for SUB. As soon as one uppercase letter is present, search becomes case-sensitive. I attach a screenshot.

[attachment deleted by admin]
Title: Re: SSE Opcode Help File
Post by: Farabi on August 11, 2008, 01:49:18 PM
 :U Good work jj
Title: Re: SSE Opcode Help File
Post by: RuiLoureiro on August 11, 2008, 02:51:09 PM
Quote from: jj2007 on August 10, 2008, 10:26:46 PM
I attach a screenshot.

jj2007,
           Yes i know: «The search box is in the lower left corner, to the right of Exit»;

            But as far as i know and as we can see in the attached screenshot :(at the right window)

            Descr: a near return from subrotine and pop data.

            So it is not a SUB instruction
Rui
Title: Re: SSE Opcode Help File
Post by: jj2007 on August 11, 2008, 03:06:19 PM
Quote from: RuiLoureiro on August 11, 2008, 02:51:09 PM

            Descr: a near return from subrotine and pop data.

            So it is not a SUB instruction
Rui

Correct: It does find sub in subroutine. Call it a bug if you like; the alternative would be a whole word search, i.e. to force typing sub* or subroutine in case you want to find subroutine. I prefer a fast reaction, because the upper left listbox shows you anyway the mnemonic.

But I thought your problem was you didn't find any sub?

Quote from: RuiLoureiro on August 10, 2008, 08:54:29 PM
Hi jj2007,
                 I tried to search    SUB.   It  hasnt that  opcode.
                 Why ? Did i do some mistake ?
Rui
Title: Re: SSE Opcode Help File
Post by: Mark Jones on August 11, 2008, 08:26:58 PM
Fantastic work! Only thing left to do is add an entry for each opcode explaining (briefly) how each is used. Something like "Adds SRC to DEST, sets FLAGS (Z,C,S,P)." :U
Title: Re: SSE Opcode Help File
Post by: RuiLoureiro on August 11, 2008, 08:44:21 PM
jj2007,
          In fact, when i tried to search SUB i expected to get the SUB asm instruction and not
          SUBrotine. Like ADD, ADC, DEC, INC, etc. It will be better, in my opinion.
          For example: Is the instruction     «SUB        mem, 520»      correct ?
                             I type SUB and i dont find that sub.
Rui
Title: Re: SSE Opcode Help File
Post by: jj2007 on August 11, 2008, 09:06:19 PM
Quote from: RuiLoureiro on August 11, 2008, 08:44:21 PM
          For example: Is the instruction     «SUB        mem, 520»      correct ?
                             I type SUB and i dont find that sub.
Type sub /m8 to find the only entry that fits your search. Otherwise, open the original OpCodes.asc with a text editor and try to find it.
Title: Re: SSE Opcode Help File
Post by: PBrennick on August 11, 2008, 10:04:47 PM
Hi Mark,
Thanks for the comment, the re-organization of the database into an ASCIIZ table will be completed today. It 'does' have a brief explanation of what each instruction does if you look in the database itself. Your point that the flags are missing is well said. I plan to add that, soon. Right now, I just want to condition the database for ease of use in a listview. I will use the same principle as I used in the ASCIIable utility where I create a pointer to the start of the database and essentially walk the entire database adding data to each column as the pointer will always point to a null terminated string.

Once the table is converted, I will remove the formatting necessary for ml.exe and make a second version of a table that will easily show in HTML, etc. I will release both of them tomorrow.

Should I narrow the searches to the first column or all columns? Also, since each field is padded to a uniform length per column size, it is relatively easy to add editting ability which is the final goal (along with Exportcapability.

When I first made the database, it involved so many hours, I made a brute force program to show it worked while asking everyone to consider making a better display mechanism. There were several offers but then, nothing. So, I will do it myself.

-- Paul
Title: Re: SSE Opcode Help File
Post by: PBrennick on August 12, 2008, 06:04:57 PM
Everyone,
I have finished converting the Opcode Database into something that is more eye appealing. There are 3 data files:

OpcodeDatabase.asc,  formatted in assembly, suitable for dropping into a source file.
OpcodeDatabase.txt   formatted as a text file suitable for dropping into an editor. Very searchable.
OpcodeDatabase.html formatted as an html table, also very searchable.

I have also created a listview program using the first example. The sources are included in OpcodeDatabase.zip
The three text files are all included in Opcodes.zip

--Paul


[attachment deleted by admin]