x86mph Code
Status: Beta
Brought to you by:
darksylinc
************************************************************************************* *x86mph library *Copyright (C) 2004-2005 *Dark Sylinc * *This library is free software; you can redistribute it and/or modify it under the *terms of the GNU Lesser General Public License as published by the *Free Software Foundation; either version 2.1 of the License, or (at your option) *any later version. * *This library is distributed in the hope that it will be useful, but WITHOUT ANY *WARRANTY; without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public *License for more details. * *You should have received a copy of the GNU Lesser General Public License along with *this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, *Suite 330, Boston, MA 02111-1307 USA ************************************************************************************* The purpose of x86mph is to help developers to make fast code taking full advantage of the x86īs instructions including 3DNow!(tm), MMX(tm), and SSE To accomplish that, x86mph is mainly written in assembler (NASM compiler is used) and some functions are both written in C/C++ and asm for more compability. ========== Contents ========== 1. How to compile... 2. x86mph is under development 3. Porting and help 4. Troubleshooting 5. Special thanks 6. Legal 1. How to compile... ==================== Compiling under Win32 --------------------- Note that code will have best view with tabs as 4 spaces I only compiled x86mph on MSVC 6.0 + SP5 + Processor Pack 5 but should compile on others since I tried to mantain compability as maximum as possible. Hereīs what you need (at least): *A C/C++ compiler (only MSVC 6.0 was tested) *NASM v0.98.38 (other versions may work) If you do not meet this requierements you should probably define some macros and change code to fit your compiling needs. *A C/C++ compiler (only MSVC 6.0 was tested) -------------------------------------------- Well... i canīt help you with this yet! *NASM v0.98.38 (other versions may work) ---------------------------------------- In case of MSVC, nasm should be installed as "nasm.exe" in the compliersībin/ directory. Where do I get nasm? ------------------- Go to http://sourceforge.net/projects/nasm/ Compiling under Unix --------------------- I only compiled x86mph on Mandrakelinux 10.1 with kernel 2.8.6 Others may work and the makefile was generated by hand (I will use autoconf in the future...) Type make help for help. You need make, gcc, nasm (http://sourceforge.net/projects/nasm/) and ar Cd'ing to x86pmh directory and type "make clean" Then "make release" (or "make debug") 2. x86mph is under development ============================== Some functions may not have their MMX/SSE/3DNow! pair because it has yet to be written. It is also possible that some functions (not many) donīt really speed up your tasks. For example, some of the 3DNow! functions may not work. I donīt have even an AMD CPU to test them. Most MMX and SSE codes were tested. See docs for more information 3. Porting and help =================== Help is always appreciated. You can send your bugsfixes to darksylinc@users.sourceforge.net Iīm trying to port x86mph to other OS, other compilers and even other APIs. For example, the TnL (transorm and lightning) is specially developed for Direct3D 7 and using the struct D3DTLVERTEX. However you can modify to use it with OpenGL. Contributions (specilly with OpenGL is appreciated) 4. Troubleshooting ================== If SSE funcs are crashing your app, saying "Priviliged Instruction" when executing a movaps instruction, that's a compiler bug. The compiler is not aligning x86mph's internal memory to 16-bytes. Try changing your compiler's arguments (on MSVC setting from debug to release fixes the problem) or use the debug version of x86mph which uses movups instead. 5. Special Thanks ================== Special thanks go to: (no particular order) Jęrome for being my first beta tester 6. Legal ======== x86mph library Copyright (c) 2004 Dark Sylinc See COPYRIGHT file for more details Intel, Intel386, Intel486, Pentium, Intel Xeon, Intel NetBurst, Intel SpeedStep, MMX, Celeron, and Itanium are trademarks or registered trademarks of Intel Corporation and its subsidiaries in the United States and other countries. Microsoft, MS-DOS, Windows, Windows NT, ActiveX, Direct3D, DirectAnimation, DirectDraw, DirectInput, DirectMusic, DirectPlay, DirectShow, DirectSound, DirectX, Natural, and Win32 are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.