flat assembler
Message board for the users of flat assembler.

Index > Windows > New push method. SSE method (Win 32)

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1840
Roman 03 Jun 2014, 12:38
my sample MessageBoxA:
Code:
data  dd 0,text1,text2,0
text1 db 'Hello !',0
text2 db 'Message:',0

movups xmm1,[data]
sub  esp,16
movups dqword [esp],xmm1
call [MessageBoxA]
    

This SSE code fast in 1.6 unlike four Pushs ! I tested on Intel I5(2320) 3Ghz
How to write a macro that would consider how much to take parameters for function ?

I know about invoke. Invoke done pushs as much as write parameters !
I need new macro for SSE ! I mean macro like invoke, but for xmm register, not for push
Post 03 Jun 2014, 12:38
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1840
Roman 03 Jun 2014, 13:17
Macro must calculate how sub from esp and how do movups\movsd\movd.
I mean if need 6 parameters for function and macro must generated like this code:
Code:
movups xmm1,[data]
movsd   xmm2,qword [data+16]
sub  esp,24 
movups dqword [esp],xmm1
movsd qword [esp+16],xmm2 
call [SomeFunction]
    
Post 03 Jun 2014, 13:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20430
Location: In your JS exploiting you and your system
revolution 03 Jun 2014, 13:22
What if the data is in registers?
Code:
invoke Function,eax,edi,ebx,ecx    
Post 03 Jun 2014, 13:22
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1840
Roman 03 Jun 2014, 14:39
I want to make regardless function, from registers ! If i long time not programming, then hard read and understand code when using registers. And i spend many times when i read old code.
I have standart and this standart make more easily read my code.
But you revolution leaving from my problems ! Smile
Post 03 Jun 2014, 14:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.