diff options
author | Mark Loeser <halcy0n@gentoo.org> | 2005-09-05 21:41:17 +0000 |
---|---|---|
committer | Mark Loeser <halcy0n@gentoo.org> | 2005-09-05 21:41:17 +0000 |
commit | c883e31e19d3968889a7e7ba35d5fafb77462711 (patch) | |
tree | d012f895e3706ea4284672e4bdeb5cf5a30f3c1b /games-emulation/openmsx | |
parent | ~amd64 (diff) | |
download | historical-c883e31e19d3968889a7e7ba35d5fafb77462711.tar.gz historical-c883e31e19d3968889a7e7ba35d5fafb77462711.tar.bz2 historical-c883e31e19d3968889a7e7ba35d5fafb77462711.zip |
Adding upstream patch to fix compilation with GCC4. Some slight changes were
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'games-emulation/openmsx')
-rw-r--r-- | games-emulation/openmsx/ChangeLog | 7 | ||||
-rw-r--r-- | games-emulation/openmsx/Manifest | 21 | ||||
-rw-r--r-- | games-emulation/openmsx/files/openmsx-0.5.2-gcc4.patch | 758 | ||||
-rw-r--r-- | games-emulation/openmsx/openmsx-0.5.2.ebuild | 3 |
4 files changed, 777 insertions, 12 deletions
diff --git a/games-emulation/openmsx/ChangeLog b/games-emulation/openmsx/ChangeLog index c2f0ed625eda..bca99ad0b92e 100644 --- a/games-emulation/openmsx/ChangeLog +++ b/games-emulation/openmsx/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-emulation/openmsx # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/openmsx/ChangeLog,v 1.14 2005/09/01 19:20:15 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/openmsx/ChangeLog,v 1.15 2005/09/05 21:41:17 halcy0n Exp $ + + 05 Sep 2005; Mark Loeser <halcy0n@gentoo.org> + +files/openmsx-0.5.2-gcc4.patch, openmsx-0.5.2.ebuild: + Adding upstream patch to fix compilation with GCC4. Some slight changes were + made to the upstream patch, since it broken compilation with gcc-3.3. 01 Sep 2005; Gustavo Zacarias <gustavoz@gentoo.org> openmsx-0.5.1.ebuild, openmsx-0.5.2.ebuild: diff --git a/games-emulation/openmsx/Manifest b/games-emulation/openmsx/Manifest index f1a51d1a4da8..826cda641769 100644 --- a/games-emulation/openmsx/Manifest +++ b/games-emulation/openmsx/Manifest @@ -1,24 +1,25 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 21ab36385cf75118ea0d9e5259e1634a openmsx-0.3.4.ebuild 1860 -MD5 27c76241a3ac8b7d0d66da7b2866a1b3 openmsx-0.5.2.ebuild 1103 -MD5 350e6811a8f965165d2177b2221c4f70 openmsx-0.5.1.ebuild 1103 -MD5 c0b1dae951fcd6224efdfbaad38aa077 ChangeLog 2156 +MD5 aac13020cd82ac749899909c12745986 ChangeLog 2413 MD5 7f1f3c0172523729641ba9bc11dcbe55 metadata.xml 248 +MD5 21ab36385cf75118ea0d9e5259e1634a openmsx-0.3.4.ebuild 1860 MD5 b2ddd92edbc173c71a7a26502da80535 openmsx-0.4.0.ebuild 1096 +MD5 350e6811a8f965165d2177b2221c4f70 openmsx-0.5.1.ebuild 1103 +MD5 c684b1c6e6f6fee79a81e2d5ba65203c openmsx-0.5.2.ebuild 1140 MD5 c9145ee916ff637d0bb770affed4df4d files/0.5.1-custom.mk.patch 793 -MD5 7e488066115ef9f2e653d6260cd2499b files/openmsx-0.4.0-custom.mk.patch 377 +MD5 c9145ee916ff637d0bb770affed4df4d files/0.5.2-custom.mk.patch 793 MD5 04f5dc7ba36939e792262356a7558ac1 files/digest-openmsx-0.3.4 66 MD5 b55f13765241896c1c13a29faba65874 files/digest-openmsx-0.4.0 65 MD5 7ccfd4ca66e1508cc53df4ef7aa7ffe0 files/digest-openmsx-0.5.1 66 MD5 91653dad0231dd7e9a7e3d6e4ec5cd99 files/digest-openmsx-0.5.2 66 +MD5 7e488066115ef9f2e653d6260cd2499b files/openmsx-0.4.0-custom.mk.patch 377 MD5 2aa177e70143c6086066c46f58217c69 files/openmsx-0.4.0-symlinking.patch 772 -MD5 c9145ee916ff637d0bb770affed4df4d files/0.5.2-custom.mk.patch 793 +MD5 10087388eb3cb770a95f8adb6191333b files/openmsx-0.5.2-gcc4.patch 19379 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) +Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFDF1SRKRy60XGEcJIRArjHAJ9c8paDZKbAM6PhpQ2/GLjCoVOSPgCfSsrP -or8okx7afPUfgtkFkZjFmuQ= -=6VXF +iD8DBQFDHLuKCRZPokWLroQRAm3uAKDdqzspaVdm7weCiKoA0QXGJ+McJgCg0IOU +iN1HQt/AvoEhPKyCtXGuKSk= +=YqXl -----END PGP SIGNATURE----- diff --git a/games-emulation/openmsx/files/openmsx-0.5.2-gcc4.patch b/games-emulation/openmsx/files/openmsx-0.5.2-gcc4.patch new file mode 100644 index 000000000000..f217f744d204 --- /dev/null +++ b/games-emulation/openmsx/files/openmsx-0.5.2-gcc4.patch @@ -0,0 +1,758 @@ +diff -ur openmsx-0.5.2-orig/src/sound/Y8950.cc openmsx-0.5.2/src/sound/Y8950.cc +--- openmsx-0.5.2-orig/src/sound/Y8950.cc 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/sound/Y8950.cc 2005-09-03 22:31:27.000000000 -0400 +@@ -18,6 +18,22 @@ + + namespace openmsx { + ++static const double PI = 3.14159265358979; ++static const double EG_STEP = 0.1875; ++static const double SL_STEP = 3.0; ++static const double TL_STEP = 0.75; ++static const double DB_STEP = 0.1875; ++ ++// PM speed(Hz) and depth(cent) ++static const double PM_SPEED = 6.4; ++static const double PM_DEPTH = 13.75 / 2; ++static const double PM_DEPTH2 = 13.75; ++ ++// AM speed(Hz) and depth(dB) ++static const double AM_SPEED = 3.7; ++static const double AM_DEPTH = 1.0; ++static const double AM_DEPTH2 = 4.8; ++ + short Y8950::dB2LinTab[(2*DB_MUTE)*2]; + int Y8950::Slot::sintable[PG_WIDTH]; + int Y8950::Slot::tllTable[16][8][1<<TL_BITS][4]; +diff -ur openmsx-0.5.2-orig/src/sound/Y8950.hh openmsx-0.5.2/src/sound/Y8950.hh +--- openmsx-0.5.2-orig/src/sound/Y8950.hh 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/sound/Y8950.hh 2005-09-03 22:31:27.000000000 -0400 +@@ -115,11 +115,9 @@ + + + // Dynamic range of envelope +- static const double EG_STEP = 0.1875; + static const int EG_BITS = 9; + static const int EG_MUTE = 1<<EG_BITS; + // Dynamic range of sustine level +- static const double SL_STEP = 3.0; + static const int SL_BITS = 4; + static const int SL_MUTE = 1<<SL_BITS; + // Size of Sintable ( 1 -- 18 can be used, but 7 -- 14 recommended.) +@@ -133,7 +131,6 @@ + static const int EG_DP_BITS = 23; + static const int EG_DP_WIDTH = 1<<EG_DP_BITS; + // Dynamic range of total level +- static const double TL_STEP = 0.75; + static const int TL_BITS = 6; + static const int TL_MUTE = 1<<TL_BITS; + +@@ -193,7 +190,6 @@ + // Definition of envelope mode + enum { ATTACK,DECAY,SUSHOLD,SUSTINE,RELEASE,FINISH }; + // Dynamic range +- static const double DB_STEP = 0.1875; + static const int DB_BITS = 9; + static const int DB_MUTE = 1<<DB_BITS; + // PM table is calcurated by PM_AMP * pow(2,PM_DEPTH*sin(x)/1200) +@@ -264,15 +260,6 @@ + Slot *slot[18]; + + static const int CLK_FREQ = 3579545; +- static const double PI = 3.14159265358979; +- // PM speed(Hz) and depth(cent) +- static const double PM_SPEED = 6.4; +- static const double PM_DEPTH = (13.75/2); +- static const double PM_DEPTH2 = 13.75; +- // AM speed(Hz) and depth(dB) +- static const double AM_SPEED = 3.7; +- static const double AM_DEPTH = 1.0; +- static const double AM_DEPTH2 = 4.8; + // Bits for liner value + static const int DB2LIN_AMP_BITS = 11; + static const int SLOT_AMP_BITS = DB2LIN_AMP_BITS; +diff -ur openmsx-0.5.2-orig/src/sound/YM2413.cc openmsx-0.5.2/src/sound/YM2413.cc +--- openmsx-0.5.2-orig/src/sound/YM2413.cc 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/sound/YM2413.cc 2005-09-03 22:31:27.000000000 -0400 +@@ -20,6 +20,18 @@ + + static const int CLOCK_FREQ = 3579545; + static const double PI = 3.14159265358979323846; ++static const double DB_STEP = 48.0 / (1 << 8); // 48 / (1 << DB_BITS) ++static const double EG_STEP = 0.375; ++static const double TL_STEP = 0.75; ++static const double SL_STEP = 3.0; ++ ++// PM speed(Hz) and depth(cent) ++static const double PM_SPEED = 6.4; ++static const double PM_DEPTH = 13.75; ++ ++// AM speed(Hz) and depth(dB) ++static const double AM_SPEED = 3.6413; ++static const double AM_DEPTH = 4.875; + + int YM2413::pmtable[PM_PG_WIDTH]; + int YM2413::amtable[AM_PG_WIDTH]; +diff -ur openmsx-0.5.2-orig/src/sound/YM2413.hh openmsx-0.5.2/src/sound/YM2413.hh +--- openmsx-0.5.2-orig/src/sound/YM2413.hh 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/sound/YM2413.hh 2005-09-03 22:31:27.000000000 -0400 +@@ -11,13 +11,14 @@ + namespace openmsx { + + class EmuTime; ++class MSXMotherBoard; + + class YM2413 : public YM2413Core, private SoundDevice, private Debuggable + { + struct Patch { + Patch(); + Patch(int n, const byte* data); +- ++ + bool AM, PM, EG; + byte KR; // 0-1 + byte ML; // 0-15 +@@ -174,21 +175,17 @@ + + // Dynamic range (Accuracy of sin table) + static const int DB_BITS = 8; +- static const double DB_STEP = 48.0 / (1 << DB_BITS); + static const int DB_MUTE = 1 << DB_BITS; + + // Dynamic range of envelope +- static const double EG_STEP = 0.375; + static const int EG_BITS = 7; + static const int EG_MUTE = 1 << EG_BITS; + + // Dynamic range of total level +- static const double TL_STEP = 0.75; + static const int TL_BITS = 6; + static const int TL_MUTE = 1 << TL_BITS; + + // Dynamic range of sustine level +- static const double SL_STEP = 3.0; + static const int SL_BITS = 4; + static const int SL_MUTE = 1 << SL_BITS; + +@@ -210,18 +207,10 @@ + static const int AM_DP_BITS = 16; + static const int AM_DP_WIDTH = 1 << AM_DP_BITS; + +- // PM table is calcurated by PM_AMP * pow(2,PM_DEPTH*sin(x)/1200) ++ // PM table is calcurated by PM_AMP * pow(2,PM_DEPTH*sin(x)/1200) + static const int PM_AMP_BITS = 8; + static const int PM_AMP = 1 << PM_AMP_BITS; + +- // PM speed(Hz) and depth(cent) +- static const double PM_SPEED = 6.4; +- static const double PM_DEPTH = 13.75; +- +- // AM speed(Hz) and depth(dB) +- static const double AM_SPEED = 3.6413; +- static const double AM_DEPTH = 4.875; +- + int maxVolume; + + // Register +Only in openmsx-0.5.2-orig/src/sound: YM2413.hh.orig +diff -ur openmsx-0.5.2-orig/src/video/Scale2xScaler.cc openmsx-0.5.2/src/video/Scale2xScaler.cc +--- openmsx-0.5.2-orig/src/video/Scale2xScaler.cc 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/video/Scale2xScaler.cc 2005-09-03 22:31:27.000000000 -0400 +@@ -132,8 +132,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -254,8 +256,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -364,8 +368,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -570,8 +576,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -702,8 +710,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -805,8 +815,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -922,8 +934,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +@@ -1037,8 +1051,10 @@ + , "r" (src2) // 2 + , "r" (dst) // 3 + : "eax" ++ #ifdef __MMX__ + , "mm0", "mm1", "mm2", "mm3" + , "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + }; +diff -ur openmsx-0.5.2-orig/src/video/Scaler.cc openmsx-0.5.2/src/video/Scaler.cc +--- openmsx-0.5.2-orig/src/video/Scaler.cc 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/video/Scaler.cc 2005-09-03 22:40:18.000000000 -0400 +@@ -86,8 +86,11 @@ + , "r" (pOut) // 1 + , "r" (nBytes) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3" , ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -126,8 +129,11 @@ + , "r" (pOut) // 1 + , "r" (nBytes) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3", ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -195,8 +201,11 @@ + , "r" (pOut) // 1 + , "r" (width) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3", ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -244,8 +253,11 @@ + , "r" (pOut) // 1 + , "r" (width) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3", ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -293,8 +305,11 @@ + , "r" (pOut) // 1 + , "r" (width) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3", ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -342,8 +357,11 @@ + , "r" (pOut) // 1 + , "r" (width) // 2 + , "r" (0) // 3 +- : "mm0", "mm1", "mm2", "mm3" +- , "mm4", "mm5", "mm6", "mm7" ++ #ifdef __MMX__ ++ : ++ "mm0", "mm1", "mm2", "mm3", ++ "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -396,7 +414,10 @@ + , "rm" (col32) // 1 + , "r" (width * sizeof(Pixel)) // 2 + , "r" (0) // 3 +- : "mm0" ++ #ifdef __MMX__ ++ : ++ "mm0" ++ #endif + ); + return; + } +@@ -429,7 +450,10 @@ + , "rm" (col32) // 1 + , "r" (width * sizeof(Pixel)) // 2 + , "r" (0) // 3 +- : "mm0" ++ #ifdef __MMX__ ++ : ++ "mm0" ++ #endif + ); + return; + } +diff -ur openmsx-0.5.2-orig/src/video/SimpleScaler.cc openmsx-0.5.2/src/video/SimpleScaler.cc +--- openmsx-0.5.2-orig/src/video/SimpleScaler.cc 2005-09-03 22:39:10.000000000 -0400 ++++ openmsx-0.5.2/src/video/SimpleScaler.cc 2005-09-03 22:31:27.000000000 -0400 +@@ -260,13 +260,13 @@ + "punpcklwd %%mm6, %%mm6;" + "punpckldq %%mm6, %%mm6;" // mm6 = c2 + "pxor %%mm7, %%mm7;" +- +- "movd (%0,%%eax,4), %%mm0;" ++ ++ "movd (%0,%%eax), %%mm0;" + "punpcklbw %%mm7, %%mm0;" // p0 = pIn[0] + "movq %%mm0, %%mm2;" + "pmullw %%mm5, %%mm2;" // f0 = multiply(p0, c1) + "movq %%mm2, %%mm3;" // f1 = f0 +- ++ + ".p2align 4,,15;" + "1:" + "pmullw %%mm6, %%mm0;" +@@ -274,31 +274,31 @@ + "paddw %%mm3, %%mm0;" + "psrlw $8, %%mm0;" // f1 + tmp + +- "movd 4(%0,%%eax,4), %%mm1;" ++ "movd 4(%0,%%eax), %%mm1;" + "punpcklbw %%mm7, %%mm1;" // p1 = pIn[x + 1] + "movq %%mm1, %%mm3;" + "pmullw %%mm5, %%mm3;" // f1 = multiply(p1, c1) + "paddw %%mm3, %%mm4;" + "psrlw $8, %%mm4;" // f1 + tmp + "packuswb %%mm4, %%mm0;" +- "movq %%mm0, (%1,%%eax,8);" // pOut[2*x+0] = .. pOut[2*x+1] = .. ++ "movq %%mm0, (%1,%%eax,2);" // pOut[2*x+0] = .. pOut[2*x+1] = .. + + "pmullw %%mm6, %%mm1;" + "movq %%mm1, %%mm4;" // tmp = multiply(p1, c2) + "paddw %%mm2, %%mm1;" + "psrlw $8, %%mm1;" // f0 + tmp + +- "movd 8(%0,%%eax,4), %%mm0;" ++ "movd 8(%0,%%eax), %%mm0;" + "punpcklbw %%mm7, %%mm0;" // p0 = pIn[x + 2] + "movq %%mm0, %%mm2;" + "pmullw %%mm5, %%mm2;" // f0 = multiply(p0, c1) + "paddw %%mm2, %%mm4;" + "psrlw $8, %%mm4;" // f0 + tmp + "packuswb %%mm4, %%mm1;" +- "movq %%mm1, 8(%1,%%eax,8);" // pOut[2*x+2] = .. pOut[2*x+3] = .. ++ "movq %%mm1, 8(%1,%%eax,2);" // pOut[2*x+2] = .. pOut[2*x+3] = .. + +- "addl $2, %%eax;" +- "cmpl $318, %%eax;" ++ "addl $8, %%eax;" ++ "cmpl $1272, %%eax;" + "jl 1b;" + + "pmullw %%mm6, %%mm0;" +@@ -306,23 +306,23 @@ + "paddw %%mm3, %%mm0;" + "psrlw $8, %%mm0;" // f1 + tmp + +- "movd 4(%0,%%eax,4), %%mm1;" ++ "movd 4(%0,%%eax), %%mm1;" + "punpcklbw %%mm7, %%mm1;" // p1 = pIn[x + 1] + "movq %%mm1, %%mm3;" + "pmullw %%mm5, %%mm3;" // f1 = multiply(p1, c1) + "paddw %%mm3, %%mm4;" + "psrlw $8, %%mm4;" // f1 + tmp + "packuswb %%mm4, %%mm0;" +- "movq %%mm0, (%1,%%eax,8);" // pOut[2*x+0] = .. pOut[2*x+1] = .. +- ++ "movq %%mm0, (%1,%%eax,2);" // pOut[2*x+0] = .. pOut[2*x+1] = .. ++ + "movq %%mm1, %%mm4;" + "pmullw %%mm6, %%mm1;" // tmp = multiply(p1, c2) + "paddw %%mm2, %%mm1;" + "psrlw $8, %%mm1;" // f0 + tmp + + "packuswb %%mm4, %%mm1;" +- "movq %%mm1, 8(%1,%%eax,8);" // pOut[2*x+0] = .. pOut[2*x+1] = .. +- ++ "movq %%mm1, 8(%1,%%eax,2);" // pOut[2*x+0] = .. pOut[2*x+1] = .. ++ + "emms;" + + : // no output +@@ -330,17 +330,19 @@ + , "r" (pOut) // 1 + , "r" (c1) // 2 + , "r" (c2) // 3 +- : "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" +- , "eax" ++ : "eax" ++ #ifdef __MMX__ ++ , "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } + #endif +- ++ + // non-MMX routine, both 16bpp and 32bpp + mult1.setFactor(c1); + mult2.setFactor(c2); +- ++ + Pixel p0 = pIn[0]; + Pixel p1; + unsigned f0 = mult1.mul32(p0); +@@ -428,16 +430,16 @@ + "punpcklwd %%mm6, %%mm6;" + "punpckldq %%mm6, %%mm6;" // mm6 = c2 + "pxor %%mm7, %%mm7;" +- +- "movd (%0,%%eax,4), %%mm0;" ++ ++ "movd (%0,%%eax), %%mm0;" + "punpcklbw %%mm7, %%mm0;" // p0 = pIn[0] + "movq %%mm0, %%mm2;" + "pmullw %%mm5, %%mm2;" // f0 = multiply(p0, c1) + "movq %%mm2, %%mm3;" // f1 = f0 +- ++ + ".p2align 4,,15;" + "1:" +- "movd 4(%0,%%eax,4), %%mm1;" ++ "movd 4(%0,%%eax), %%mm1;" + "pxor %%mm7, %%mm7;" + "punpcklbw %%mm7, %%mm1;" // p1 = pIn[x + 1] + "movq %%mm0, %%mm4;" +@@ -449,7 +451,7 @@ + "psrlw $8, %%mm4;" // f0 + t + t0 + "movq %%mm0, %%mm2;" // f0 = t0 + +- "movd 8(%0,%%eax,4), %%mm0;" ++ "movd 8(%0,%%eax), %%mm0;" + "punpcklbw %%mm7, %%mm0;" + "movq %%mm1, %%mm7;" + "pmullw %%mm6, %%mm7;" // t = multiply(p1, c2) +@@ -460,13 +462,13 @@ + "psrlw $8, %%mm7;" // f1 + t + t1 + "movq %%mm1, %%mm3;" // f1 = t1 + "packuswb %%mm7, %%mm4;" +- "movq %%mm4, (%1,%%eax,4);" // pOut[x] = .. pOut[x+1] = .. +- +- "addl $2, %%eax;" +- "cmpl $638, %%eax;" ++ "movq %%mm4, (%1,%%eax);" // pOut[x] = .. pOut[x+1] = .. ++ ++ "addl $8, %%eax;" ++ "cmpl $2552, %%eax;" + "jl 1b;" + +- "movd 4(%0,%%eax,4), %%mm1;" ++ "movd 4(%0,%%eax), %%mm1;" + "pxor %%mm7, %%mm7;" + "punpcklbw %%mm7, %%mm1;" // p1 = pIn[x + 1] + "movq %%mm0, %%mm4;" +@@ -482,8 +484,8 @@ + "paddw %%mm0, %%mm1;" + "psrlw $8, %%mm1;" // f1 + t + t1 + "packuswb %%mm1, %%mm4;" +- "movq %%mm4, (%1,%%eax,4);" // pOut[x] = .. pOut[x+1] = .. +- ++ "movq %%mm4, (%1,%%eax);" // pOut[x] = .. pOut[x+1] = .. ++ + "emms;" + + : // no output +@@ -491,8 +493,10 @@ + , "r" (pOut) // 1 + , "r" (c1) // 2 + , "r" (c2) // 3 +- : "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" +- , "eax" ++ : "eax" ++ #ifdef __MMX__ ++ , "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -547,8 +551,8 @@ + "pshufw $0, %%mm6, %%mm6;" + ".p2align 4,,15;" + "1:" +- "movq (%0,%%eax,4), %%mm0;" +- "pavgb (%1,%%eax,4), %%mm0;" ++ "movq (%0,%%eax), %%mm0;" ++ "pavgb (%1,%%eax), %%mm0;" + "movq %%mm0, %%mm4;" + "punpcklbw %%mm7, %%mm0;" + "punpckhbw %%mm7, %%mm4;" +@@ -556,8 +560,8 @@ + "pmulhuw %%mm6, %%mm4;" + "packuswb %%mm4, %%mm0;" + +- "movq 8(%0,%%eax,4), %%mm1;" +- "pavgb 8(%1,%%eax,4), %%mm1;" ++ "movq 8(%0,%%eax), %%mm1;" ++ "pavgb 8(%1,%%eax), %%mm1;" + "movq %%mm1, %%mm5;" + "punpcklbw %%mm7, %%mm1;" + "punpckhbw %%mm7, %%mm5;" +@@ -565,8 +569,8 @@ + "pmulhuw %%mm6, %%mm5;" + "packuswb %%mm5, %%mm1;" + +- "movq 16(%0,%%eax,4), %%mm2;" +- "pavgb 16(%1,%%eax,4), %%mm2;" ++ "movq 16(%0,%%eax), %%mm2;" ++ "pavgb 16(%1,%%eax), %%mm2;" + "movq %%mm2, %%mm4;" + "punpcklbw %%mm7, %%mm2;" + "punpckhbw %%mm7, %%mm4;" +@@ -574,8 +578,8 @@ + "pmulhuw %%mm6, %%mm4;" + "packuswb %%mm4, %%mm2;" + +- "movq 24(%0,%%eax,4), %%mm3;" +- "pavgb 24(%1,%%eax,4), %%mm3;" ++ "movq 24(%0,%%eax), %%mm3;" ++ "pavgb 24(%1,%%eax), %%mm3;" + "movq %%mm3, %%mm5;" + "punpcklbw %%mm7, %%mm3;" + "punpckhbw %%mm7, %%mm5;" +@@ -583,24 +587,26 @@ + "pmulhuw %%mm6, %%mm5;" + "packuswb %%mm5, %%mm3;" + +- "movntq %%mm0, (%2,%%eax,4);" +- "movntq %%mm1, 8(%2,%%eax,4);" +- "movntq %%mm2, 16(%2,%%eax,4);" +- "movntq %%mm3, 24(%2,%%eax,4);" +- +- "addl $8, %%eax;" +- "cmpl $640, %%eax;" ++ "movntq %%mm0, (%2,%%eax);" ++ "movntq %%mm1, 8(%2,%%eax);" ++ "movntq %%mm2, 16(%2,%%eax);" ++ "movntq %%mm3, 24(%2,%%eax);" ++ ++ "addl $32, %%eax;" ++ "cmpl $2560, %%eax;" + "jl 1b;" +- ++ + "emms;" +- ++ + : // no output + : "r" (src1) // 0 + , "r" (src2) // 1 + , "r" (dst) // 2 + , "r" (alpha << 8) // 3 +- : "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" +- , "eax" ++ : "eax" ++ #ifdef __MMX__ ++ , "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" ++ #endif + ); + return; + +@@ -610,15 +616,14 @@ + "movd %3, %%mm6;" + "pxor %%mm7, %%mm7;" + "punpcklwd %%mm6, %%mm6;" +- "punpckldq %%mm6, %%mm6;" +- + "xorl %%eax, %%eax;" ++ "punpckldq %%mm6, %%mm6;" + ".p2align 4,,15;" + "1:" + // load +- "movq (%0,%%eax,4), %%mm0;" ++ "movq (%0,%%eax), %%mm0;" + "movq %%mm0, %%mm1;" +- "movq (%1,%%eax,4), %%mm2;" ++ "movq (%1,%%eax), %%mm2;" + "movq %%mm2, %%mm3;" + // unpack + "punpcklbw %%mm7, %%mm0;" +@@ -634,21 +639,23 @@ + // pack + "packuswb %%mm1, %%mm0;" + // store +- "movq %%mm0, (%2,%%eax,4);" +- +- "addl $2, %%eax;" +- "cmpl $640, %%eax;" ++ "movq %%mm0, (%2,%%eax);" ++ ++ "addl $8, %%eax;" ++ "cmpl $2560, %%eax;" + "jl 1b;" +- ++ + "emms;" +- ++ + : // no output + : "r" (src1) // 0 + , "r" (src2) // 1 + , "r" (dst) // 2 + , "r" (alpha << 7) // 3 +- : "mm0", "mm1", "mm2", "mm3", "mm6", "mm7" +- , "eax" ++ : "eax" ++ #ifdef __MMX__ ++ , "mm0", "mm1", "mm2", "mm3", "mm6", "mm7" ++ #endif + ); + return; + } +@@ -659,17 +666,17 @@ + darkener.setFactor(alpha); + word* table = darkener.getTable(); + Pixel mask = ~blender.getMask(); +- ++ + asm ( + "movd %4, %%mm7;" + "xorl %%ecx, %%ecx;" + "pshufw $0, %%mm7, %%mm7;" +- ++ + ".p2align 4,,15;" +- "1:" "movq (%0,%%ecx,2), %%mm0;" +- "movq 8(%0,%%ecx,2), %%mm1;" +- "movq (%1,%%ecx,2), %%mm2;" +- "movq 8(%1,%%ecx,2), %%mm3;" ++ "1:" "movq (%0,%%ecx), %%mm0;" ++ "movq 8(%0,%%ecx), %%mm1;" ++ "movq (%1,%%ecx), %%mm2;" ++ "movq 8(%1,%%ecx), %%mm3;" + + "movq %%mm7, %%mm4;" + "movq %%mm7, %%mm5;" +@@ -683,14 +690,14 @@ + "pavgw %%mm3, %%mm1;" + "paddw %%mm4, %%mm0;" + "paddw %%mm5, %%mm1;" +- ++ + "pextrw $0, %%mm0, %%eax;" + "movw (%2,%%eax,2), %%ax;" + "pinsrw $0, %%eax, %%mm0;" + "pextrw $0, %%mm1, %%eax;" + "movw (%2,%%eax,2), %%ax;" + "pinsrw $0, %%eax, %%mm1;" +- ++ + "pextrw $1, %%mm0, %%eax;" + "movw (%2,%%eax,2), %%ax;" + "pinsrw $1, %%eax, %%mm0;" +@@ -711,12 +718,12 @@ + "pextrw $3, %%mm1, %%eax;" + "movw (%2,%%eax,2), %%ax;" + "pinsrw $3, %%eax, %%mm1;" +- +- "movntq %%mm0, (%3,%%ecx,2);" +- "movntq %%mm1, 8(%3,%%ecx,2);" + +- "addl $8, %%ecx;" +- "cmpl $640, %%ecx;" ++ "movntq %%mm0, (%3,%%ecx);" ++ "movntq %%mm1, 8(%3,%%ecx);" ++ ++ "addl $16, %%ecx;" ++ "cmpl $1280, %%ecx;" + "jl 1b;" + "emms;" + : // no output +@@ -725,16 +732,18 @@ + , "r" (table) // 2 + , "r" (dst) // 3 + , "m" (mask) // 4 +- : "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm7" +- , "eax", "ecx" ++ : "eax", "ecx" ++ #ifdef __MMX__ ++ , "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm7" ++ #endif + ); + return; + } + // MMX routine 16bpp is missing, but it's difficult to write because + // of the missing "pextrw" and "pinsrw" instructions +- ++ + #endif +- ++ + // non-MMX routine, both 16bpp and 32bpp + for (unsigned x = 0; x < 640; ++x) { + dst[x] = mult1.multiply( diff --git a/games-emulation/openmsx/openmsx-0.5.2.ebuild b/games-emulation/openmsx/openmsx-0.5.2.ebuild index ceaf2217caa3..a2a5d2f23cb8 100644 --- a/games-emulation/openmsx/openmsx-0.5.2.ebuild +++ b/games-emulation/openmsx/openmsx-0.5.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/openmsx/openmsx-0.5.2.ebuild,v 1.2 2005/09/01 19:20:15 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/openmsx/openmsx-0.5.2.ebuild,v 1.3 2005/09/05 21:41:17 halcy0n Exp $ inherit flag-o-matic eutils games @@ -26,6 +26,7 @@ src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/${PV}-custom.mk.patch" + epatch "${FILESDIR}/${P}-gcc4.patch" } src_compile() { |