Codebase list mupen64plus-rsp-hle / 9a0b597
Add parentheses around arithmetic in operand of ‘^’ Sven Eckelmann 12 years ago
3 changed file(s) with 98 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
88 - Add rewrite_makefile.patch, Rewrite Makefile to fix flags and linking
99 - Add big_endian_conflict.patch, Don't use _BIG_ENDIAN to check for
1010 endianness
11 - Add endianness_xor.patch, Add parentheses around arithmetic in operand
12 of ‘^’ related to endian conversation
1113
1214 -- Sven Eckelmann <sven@narfation.org> Sat, 23 Jul 2011 16:42:47 +0200
1315
0 Description: Add parentheses around arithmetic in operand of ‘^’
1 Origin: upstream, https://bitbucket.org/richard42/mupen64plus-rsp-hle/changeset/f084f76c4780
2 Author: Sven Eckelmann <sven@narfation.org>
3
4 ---
5 diff --git a/src/ucode1.cpp b/src/ucode1.cpp
6 index 3843143e795a653a9fbf1bcf5dfb1b63df24ba7c..7d0c40fd4ea8daa90669f4b82f20ecedb47e6f06 100644
7 --- a/src/ucode1.cpp
8 +++ b/src/ucode1.cpp
9 @@ -825,17 +825,17 @@ static void LOADADPCM (void) { // Loads an ADPCM table - Works 100% Now 03-13-01
10 //assert ((inst1&0xffff) <= 0x80);
11 u16 *table = (u16 *)(rsp.RDRAM+v0);
12 for (u32 x = 0; x < ((inst1&0xffff)>>0x4); x++) {
13 - adpcmtable[0x0+(x<<3)^S] = table[0];
14 - adpcmtable[0x1+(x<<3)^S] = table[1];
15 + adpcmtable[(0x0+(x<<3))^S] = table[0];
16 + adpcmtable[(0x1+(x<<3))^S] = table[1];
17
18 - adpcmtable[0x2+(x<<3)^S] = table[2];
19 - adpcmtable[0x3+(x<<3)^S] = table[3];
20 + adpcmtable[(0x2+(x<<3))^S] = table[2];
21 + adpcmtable[(0x3+(x<<3))^S] = table[3];
22
23 - adpcmtable[0x4+(x<<3)^S] = table[4];
24 - adpcmtable[0x5+(x<<3)^S] = table[5];
25 + adpcmtable[(0x4+(x<<3))^S] = table[4];
26 + adpcmtable[(0x5+(x<<3))^S] = table[5];
27
28 - adpcmtable[0x6+(x<<3)^S] = table[6];
29 - adpcmtable[0x7+(x<<3)^S] = table[7];
30 + adpcmtable[(0x6+(x<<3))^S] = table[6];
31 + adpcmtable[(0x7+(x<<3))^S] = table[7];
32 table += 8;
33 }
34 }
35 diff --git a/src/ucode2.cpp b/src/ucode2.cpp
36 index b1688477a6b70ef267b4fabbec5591d8f3078ce3..858ee38cb568947abf01ae15b6ebaa5a6be3e9a9 100644
37 --- a/src/ucode2.cpp
38 +++ b/src/ucode2.cpp
39 @@ -56,17 +56,17 @@ static void LOADADPCM2 (void) { // Loads an ADPCM table - Works 100% Now 03-13-0
40 u16 *table = (u16 *)(rsp.RDRAM+v0); // Zelda2 Specific...
41
42 for (u32 x = 0; x < ((inst1&0xffff)>>0x4); x++) {
43 - adpcmtable[0x0+(x<<3)^S] = table[0];
44 - adpcmtable[0x1+(x<<3)^S] = table[1];
45 + adpcmtable[(0x0+(x<<3))^S] = table[0];
46 + adpcmtable[(0x1+(x<<3))^S] = table[1];
47
48 - adpcmtable[0x2+(x<<3)^S] = table[2];
49 - adpcmtable[0x3+(x<<3)^S] = table[3];
50 + adpcmtable[(0x2+(x<<3))^S] = table[2];
51 + adpcmtable[(0x3+(x<<3))^S] = table[3];
52
53 - adpcmtable[0x4+(x<<3)^S] = table[4];
54 - adpcmtable[0x5+(x<<3)^S] = table[5];
55 + adpcmtable[(0x4+(x<<3))^S] = table[4];
56 + adpcmtable[(0x5+(x<<3))^S] = table[5];
57
58 - adpcmtable[0x6+(x<<3)^S] = table[6];
59 - adpcmtable[0x7+(x<<3)^S] = table[7];
60 + adpcmtable[(0x6+(x<<3))^S] = table[6];
61 + adpcmtable[(0x7+(x<<3))^S] = table[7];
62 table += 8;
63 }
64 }
65 diff --git a/src/ucode3.cpp b/src/ucode3.cpp
66 index c0a36a0bbb4153f417f77bbe45f170ca72d8d30c..75c1e3e6e1e845bcff0b0cb00b08ed37d74eb346 100644
67 --- a/src/ucode3.cpp
68 +++ b/src/ucode3.cpp
69 @@ -534,17 +534,17 @@ static void LOADADPCM3 (void) { // Loads an ADPCM table - Works 100% Now 03-13-0
70 //assert ((inst1&0xffff) <= 0x80);
71 u16 *table = (u16 *)(rsp.RDRAM+v0);
72 for (u32 x = 0; x < ((inst1&0xffff)>>0x4); x++) {
73 - adpcmtable[0x0+(x<<3)^S] = table[0];
74 - adpcmtable[0x1+(x<<3)^S] = table[1];
75 + adpcmtable[(0x0+(x<<3))^S] = table[0];
76 + adpcmtable[(0x1+(x<<3))^S] = table[1];
77
78 - adpcmtable[0x2+(x<<3)^S] = table[2];
79 - adpcmtable[0x3+(x<<3)^S] = table[3];
80 + adpcmtable[(0x2+(x<<3))^S] = table[2];
81 + adpcmtable[(0x3+(x<<3))^S] = table[3];
82
83 - adpcmtable[0x4+(x<<3)^S] = table[4];
84 - adpcmtable[0x5+(x<<3)^S] = table[5];
85 + adpcmtable[(0x4+(x<<3))^S] = table[4];
86 + adpcmtable[(0x5+(x<<3))^S] = table[5];
87
88 - adpcmtable[0x6+(x<<3)^S] = table[6];
89 - adpcmtable[0x7+(x<<3)^S] = table[7];
90 + adpcmtable[(0x6+(x<<3))^S] = table[6];
91 + adpcmtable[(0x7+(x<<3))^S] = table[7];
92 table += 8;
93 }
94 }
00 rewrite_makefile.patch
11 big_endian_conflict.patch
2 endianness_xor.patch