Register | Login
Forum Index > Source Help > XMM Example
Author Message
Pages: 1
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1010] XMM Example - posted: 2012-05-04 19:10:34
hi ,

is there any example of new XMM supporting , please?



http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1011] - posted: 2012-05-05 01:11:12
at current, there is no xmm support, i have begun adding mmx support, once this is complete i will move onto extended instructions such as sse, sse2 etc

btw welcome back to the forum smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1012] - posted: 2012-05-05 09:44:06

thanks , i missed Ziron , i am happy to back again.

so , any example of mmx that showing us how to use them , and is it a high_level syntax?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1013] - posted: 2012-05-05 15:55:11
for now it is just regular mmx assembly instructions, once i add the whole range of opcodes i may look into adding some high level syntax smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1043] - posted: 2012-05-09 22:40:44
just thought i'd update this thread in case others check it, first example can be found here: http://www.codeziron.com/forum.php?page=topic&id=128#post1028

and in the latest beta and new releases will contain a new strlcpy macro which will of course be assembled without any changes to user apps that use strlcpy

Code:
//
// Copyright (c) 2012. OverHertz Ltd
//
inline procedure strlcpy(dest, source, len) {
  push edi
  push esi
  push ecx
  
  $if defined(assembler_MMX_ON) == true:
    push edx

    edi = $dest;
    esi = $source;  
    ecx = $len;
    edx = ecx;
    
    shr ecx, 6
    if (ecx <> 0) {
      repeat {
        movq mm0, qword[esi+0]
        movq mm1, qword[esi+8]
        movq mm2, qword[esi+16]
        movq mm3, qword[esi+24]
        movq mm4, qword[esi+32]
        movq mm5, qword[esi+40]
        movq mm6, qword[esi+48]
        movq mm7, qword[esi+56]
      
        movq qword[edi+0], mm0
        movq qword[edi+8], mm1
        movq qword[edi+16], mm2
        movq qword[edi+24], mm3
        movq qword[edi+32], mm4
        movq qword[edi+40], mm5
        movq qword[edi+48], mm6
        movq qword[edi+56], mm7
      
        esi += 64;
        edi += 64;
      
        edx -= 64;
      
        ecx--;
      } until (ecx == 0);
    }
    
    ecx = edx;  
    shr ecx, 3
    
    if (ecx <> 0) {
      repeat {
        movq mm0, qword[esi]
        movq qword[edi], mm0
    
        esi += 8;
        edi += 8;
    
        ecx--;
      } until (ecx == 0);
    }

    ecx = edx;
    and ecx, 3
    rep movsb

    pop edx
    pop ecx
    pop esi
    pop edi
    
    emms
  $else
    //cld
    edi = $dest;
    esi = $source;
    ecx = $len;
    shr ecx, 2
    rep movsd

    ecx = $len;
    and ecx, 3
    rep movsb

    pop ecx
    pop esi
    pop edi
  $end
}


i will continue to update macros and functions over time so compiled apps will also become faster smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 1 user(s) online. 0 member(s) and 1 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd