|
Pages: [1]
|
 |
|
Author
|
Topic: SSE2 macros for ML 6.14 by Daydreamer (Read 34843 times)
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Magnus is doing some great work here as his work will make ML 6.14 viable until the end of 32 bit Windows. I have re-attached his latest version of the macros so they are easier to find.
[attachment deleted by admin]
|
|
|
|
|
Logged
|
|
|
|
|
Jimg
|
I'm having a little trouble iincluding these macros. This one doesn't look right: ORPD MACRO M1,M2 DB 066H ORPS MACRO M1,M2 ENDM
After fixing that, it hates these two: CMPLTSD MACRO M1,M2 DB 0F2H CMPLTPS M1,M2 END
and CMPSD MACRO M1,M2,M3 DB 0F2H CMPPS M1,M2,M3 ENDM
The first one is missing then M on ENDM and CMPSD is reserved as a standard instruction.
|
|
|
|
« Last Edit: March 09, 2005, 01:21:56 AM by Jimg »
|
Logged
|
|
|
|
|
daydreamer
|
thanks for the feedback Jim, fixed those I dont have 6.14 so I could check them
[attachment deleted by admin]
|
|
|
|
« Last Edit: March 09, 2005, 07:29:51 AM by daydreamer »
|
Logged
|
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Magnus,
Could you just get the 6.14 version of ML.EXE from MASM32 ? It would certainly make testing the macros a lot easier.
I keep a trick for different versions of ML, I have a couple of versions renamed and a batch file for each that overwrites the existing version with a copy of which ever one I choose to use.
|
|
|
|
|
Logged
|
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
I wonder if there is an easy solution to the ambiguous names of a few of the SSE2 instructions. From memory MOVSD has been reused but there is no reliable way unless something tricky was done.
You can remove MOVSD as a keyword and redefine it as a macro of the same name and determine if there are arguments or not but I am not sure it would work after REP which is how MOVSD is usually used.
The macro would basically be if there are no arguments then its an integer string instruction where if it is an SSE2 instruction it will have parameters. I think they are complicated macros to write though.
|
|
|
|
|
Logged
|
|
|
|
AeroASM
Guest
|
Also in SSE and beyond, movdqa, movaps and movapd all do the same thing, yet they all have different encodings. Why?
|
|
|
|
|
Logged
|
|
|
|
|
daydreamer
|
I wonder if there is an easy solution to the ambiguous names of a few of the SSE2 instructions. From memory MOVSD has been reused but there is no reliable way unless something tricky was done.
You can remove MOVSD as a keyword and redefine it as a macro of the same name and determine if there are arguments or not but I am not sure it would work after REP which is how MOVSD is usually used.
The macro would basically be if there are no arguments then its an integer string instruction where if it is an SSE2 instruction it will have parameters. I think they are complicated macros to write though.
OPTION NOKEYWORD:<CMPSD MOVSD etc yes but how do I make MMX that takes .xmm regs instead of .mmx regs for SSE2 integer ones?
|
|
|
|
|
Logged
|
|
|
|
AeroASM
Guest
|
Just use the instruction: e.g. instead of paddd mm0,mm1 you would use paddd xmm0,xmm1.
If you need help look in the Intel IA-32 manuals
|
|
|
|
|
Logged
|
|
|
|
|
|
hutch--
Administrator
Member
    
Posts: 12013
Mnemonic Driven API Grinder
|
Magnus,
I had a play with removing some of the ambiguous instructions and creating a macro that does both variations but I could not get it to work with REP. MOVSD is an example where you can detect the parameters which makes it an SSE instruction or without parameters its a string instruction and it worked by itself but not with REP.
I wonder if a macro with MOVS can do the job instead ?
|
|
|
|
|
Logged
|
|
|
|
|
daydreamer
|
Magnus,
I had a play with removing some of the ambiguous instructions and creating a macro that does both variations but I could not get it to work with REP. MOVSD is an example where you can detect the parameters which makes it an SSE instruction or without parameters its a string instruction and it worked by itself but not with REP.
I wonder if a macro with MOVS can do the job instead ?
but do you really need REP MOVSD, when you choose to write SSE2 and includes the macros, when you have movdqa,movaps,movapd?
|
|
|
|
|
Logged
|
|
|
|
AeroASM
Guest
|
How about just learning the opcode sequence for rep movsd and inserting it with db?
|
|
|
|
|
Logged
|
|
|
|
|
daydreamer
|
could we have this sticky, so they are not forgotten Hutch? some SSE/SSE2 doc also heree
[attachment deleted by admin]
|
|
|
|
|
Logged
|
|
|
|
janexiao
Guest
|
有点晕
|
|
|
|
|
Logged
|
|
|
|
|
Rockoon
|
Also in SSE and beyond, movdqa, movaps and movapd all do the same thing, yet they all have different encodings. Why?
Because they do not necessarily "do the same thing" .. while current incarnations might perform the exact same work (I am not convinced), later on they may want to put in rounding control, floating point normalization, and other goodies on the floating point versions. In short, context may become important. Use the one that addresses your datatype to avoid any nasty compatability issues in the future.
|
|
|
|
|
Logged
|
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.
|
|
|
|
|
Pages: [1]
|
|
|
 |