Results 1 to 9 of 9

Thread: paq7asmsse -> GAS (uses CPUID), no .CPP changes needed

  1. #1
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking paq7asmsse -> GAS (uses CPUID), no .CPP changes needed

    Okay, so I still wanted a way for paq8f (and others) to use the SIMD speedups if available (CPUID), but my lousy paq8o8z port is obviously not interesting to anybody but myself. The only appeal for paq8f (to me) over newer versions is the lower minimum RAM (21 MB vs. 37 MB for paq8o.

    Nevertheless, I did convert the assembly to GAS, and this version doesn't need any changes to any .CPP files (well, apart from obvious things like working around tmpfile() in MinGW [_tempnam() ??] or deleting bogus "Mixer::" from paq8f that newer G++ versions bomb out on). Note that I tested it with paq8f, paq8l, and latest(?) paq8px, and it seemed to work fine (output md5sum matched that of original compiles).

    It's easy to convert this to FASM, NASM, LZASM, or WASM/JWASM syntax (as I did previously), but GCC / BinUtils is so dang common that I figured this was the most popular + portable way (at least initially).

    Only includes two files: fastpaq2.s and GNUmakefile (for testing)

    Tested with Cygwin, unofficial MinGW (G++ 4.4.0), and various DJGPP versions (including DJELF hack).

    P.S. It's not the cleanest source ever. And some of the stuff is redundant (e.g. enable_sse2) and even that could be improved (already written test using fxsave to see if SSE is already enabled), but since I don't figure anybody here cares ("modern" OS usually does it for you), I didn't bother to fix any of that (yet).

    Enjoy?

    EDIT: Nov. 26, fixed small typo/potential bug.
    EDIT: Dec. 22, updated GAS version, added NASM version
    Attached Files Attached Files
    Last edited by Rugxulo; 22nd December 2009 at 12:56.

  2. #2
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Thumbs up

    Thanks Rugxulo!

  3. #3
    Member Yuri Grille.'s Avatar
    Join Date
    Mar 2009
    Location
    ****
    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Thanks

    Hey , you can compile this file to .elf or .exe , I don't have a compiler compatible, I only have the masm compiler to windows.You can help me ??

  4. #4
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Yuri Grille. View Post
    Hey , you can compile this file to .elf or .exe , I don't have a compiler compatible, I only have the masm compiler to windows.You can help me ??
    I don't think ELF will help you on Windows. But LovePimple did compile paq8px with it, see here.

    If you want a compiler, get TDM MinGW (G++ 4.4.0) here.

  5. #5
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Skymmer View Post
    Check this link
    Beat ya to it by one minute, nyah!

  6. #6
    Member Skymmer's Avatar
    Join Date
    Mar 2009
    Location
    Russia
    Posts
    681
    Thanks
    38
    Thanked 168 Times in 84 Posts
    Quote Originally Posted by Rugxulo View Post
    Beat ya to it by one minute, nyah!
    Yep! So I've deleted my post.

  7. #7
    Member Yuri Grille.'s Avatar
    Join Date
    Mar 2009
    Location
    ****
    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    ok and Thank you !!

    /

  8. #8
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Very minor update to fallback to MMX if SSE is supported but not enabled (e.g. pure DOS under ring 3 using old CWSDPMI r5 from 2000). This is the safer and preferred approach even if considered obscure for most of you guys.

  9. #9
    Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, updated again, should still work, now also has a NASM version (e.g. for OpenWatcom which needs .OBJ format). Further testing welcome.

Similar Threads

  1. CLI memory teste needed
    By SvenBent in forum The Off-Topic Lounge
    Replies: 7
    Last Post: 21st April 2010, 09:06
  2. Precomp Help needed please
    By Rusty_v in forum Data Compression
    Replies: 2
    Last Post: 8th July 2009, 18:16
  3. Help me!!! Visual Basic programmers needed
    By moisesmcardona in forum The Off-Topic Lounge
    Replies: 1
    Last Post: 27th June 2009, 21:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •