summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-09-28 12:07:20 -0500
committerMark Salyzyn2016-09-30 14:47:05 -0500
commit66ce3e08c5632a20ea66bde6dd76397041edf034 (patch)
treee77589e0f6c62e8ac1c8faabe2d9dd2934d3ecee /libpixelflinger
parent0dd4431072cce3c62876b728cb20aa5b77b11a8d (diff)
downloadplatform-system-core-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.gz
platform-system-core-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.xz
platform-system-core-66ce3e08c5632a20ea66bde6dd76397041edf034.zip
system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example to all others. Adjust header order to comply with Android Coding standards. Test: Compile Bug: 26552300 Bug: 31289077 Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/codeflinger/ARMAssembler.cpp20
-rw-r--r--libpixelflinger/codeflinger/ARMAssemblerInterface.cpp22
-rw-r--r--libpixelflinger/codeflinger/Arm64Assembler.cpp5
-rw-r--r--libpixelflinger/codeflinger/CodeCache.cpp7
-rw-r--r--libpixelflinger/codeflinger/GGLAssembler.cpp21
-rw-r--r--libpixelflinger/codeflinger/MIPS64Assembler.cpp7
-rw-r--r--libpixelflinger/codeflinger/MIPSAssembler.cpp6
-rw-r--r--libpixelflinger/codeflinger/blending.cpp21
-rw-r--r--libpixelflinger/codeflinger/load_store.cpp52
-rw-r--r--libpixelflinger/codeflinger/mips64_disassem.c11
-rw-r--r--libpixelflinger/codeflinger/texturing.cpp20
-rw-r--r--libpixelflinger/scanline.cpp21
-rw-r--r--libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp12
-rw-r--r--libpixelflinger/trap.cpp22
14 files changed, 121 insertions, 126 deletions
diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp
index 849512ac7..36c1326f7 100644
--- a/libpixelflinger/codeflinger/ARMAssembler.cpp
+++ b/libpixelflinger/codeflinger/ARMAssembler.cpp
@@ -2,16 +2,16 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
@@ -19,9 +19,9 @@
19 19
20#include <stdio.h> 20#include <stdio.h>
21#include <stdlib.h> 21#include <stdlib.h>
22#include <cutils/log.h>
23#include <cutils/properties.h>
24 22
23#include <android/log.h>
24#include <cutils/properties.h>
25#include <private/pixelflinger/ggl_context.h> 25#include <private/pixelflinger/ggl_context.h>
26 26
27#include "ARMAssembler.h" 27#include "ARMAssembler.h"
diff --git a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
index 50419996e..67eba8040 100644
--- a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
+++ b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
@@ -2,26 +2,26 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18
19#include <errno.h> 18#include <errno.h>
20#include <stdlib.h>
21#include <stdint.h> 19#include <stdint.h>
20#include <stdlib.h>
22#include <sys/types.h> 21#include <sys/types.h>
23 22
24#include <cutils/log.h> 23#include <android/log.h>
24
25#include "ARMAssemblerInterface.h" 25#include "ARMAssemblerInterface.h"
26 26
27namespace android { 27namespace android {
diff --git a/libpixelflinger/codeflinger/Arm64Assembler.cpp b/libpixelflinger/codeflinger/Arm64Assembler.cpp
index bd11818c2..fb297ec27 100644
--- a/libpixelflinger/codeflinger/Arm64Assembler.cpp
+++ b/libpixelflinger/codeflinger/Arm64Assembler.cpp
@@ -32,14 +32,13 @@
32#include <stdlib.h> 32#include <stdlib.h>
33#include <string.h> 33#include <string.h>
34 34
35#include <cutils/log.h> 35#include <android/log.h>
36#include <cutils/properties.h> 36#include <cutils/properties.h>
37#include <private/pixelflinger/ggl_context.h> 37#include <private/pixelflinger/ggl_context.h>
38 38
39#include "codeflinger/Arm64Assembler.h" 39#include "codeflinger/Arm64Assembler.h"
40#include "codeflinger/CodeCache.h"
41#include "codeflinger/Arm64Disassembler.h" 40#include "codeflinger/Arm64Disassembler.h"
42 41#include "codeflinger/CodeCache.h"
43 42
44/* 43/*
45** -------------------------------------------- 44** --------------------------------------------
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp
index ae3851914..37bd0744e 100644
--- a/libpixelflinger/codeflinger/CodeCache.cpp
+++ b/libpixelflinger/codeflinger/CodeCache.cpp
@@ -15,17 +15,16 @@
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18#define LOG_TAG "CodeCache"
18 19
19#include <assert.h> 20#include <assert.h>
20#include <stdio.h> 21#include <stdio.h>
21#include <stdlib.h> 22#include <stdlib.h>
22#include <unistd.h>
23#include <sys/mman.h> 23#include <sys/mman.h>
24#include <unistd.h>
24 25
26#include <android/log.h>
25#include <cutils/ashmem.h> 27#include <cutils/ashmem.h>
26#define LOG_TAG "CodeCache"
27#include <cutils/log.h>
28
29 28
30#include "CodeCache.h" 29#include "CodeCache.h"
31 30
diff --git a/libpixelflinger/codeflinger/GGLAssembler.cpp b/libpixelflinger/codeflinger/GGLAssembler.cpp
index 346779f47..0b9b5a472 100644
--- a/libpixelflinger/codeflinger/GGLAssembler.cpp
+++ b/libpixelflinger/codeflinger/GGLAssembler.cpp
@@ -2,16 +2,16 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
@@ -19,10 +19,11 @@
19 19
20#include <assert.h> 20#include <assert.h>
21#include <stdint.h> 21#include <stdint.h>
22#include <stdlib.h>
23#include <stdio.h> 22#include <stdio.h>
23#include <stdlib.h>
24#include <sys/types.h> 24#include <sys/types.h>
25#include <cutils/log.h> 25
26#include <android/log.h>
26 27
27#include "GGLAssembler.h" 28#include "GGLAssembler.h"
28 29
diff --git a/libpixelflinger/codeflinger/MIPS64Assembler.cpp b/libpixelflinger/codeflinger/MIPS64Assembler.cpp
index b9f31ff11..a7bbaf7b1 100644
--- a/libpixelflinger/codeflinger/MIPS64Assembler.cpp
+++ b/libpixelflinger/codeflinger/MIPS64Assembler.cpp
@@ -25,24 +25,21 @@
25** 25**
26*/ 26*/
27 27
28
29#define LOG_TAG "MIPS64Assembler" 28#define LOG_TAG "MIPS64Assembler"
30 29
31#include <stdio.h> 30#include <stdio.h>
32#include <stdlib.h> 31#include <stdlib.h>
33#include <cutils/log.h>
34#include <cutils/properties.h>
35 32
33#include <android/log.h>
34#include <cutils/properties.h>
36#include <private/pixelflinger/ggl_context.h> 35#include <private/pixelflinger/ggl_context.h>
37 36
38#include "MIPS64Assembler.h" 37#include "MIPS64Assembler.h"
39#include "CodeCache.h" 38#include "CodeCache.h"
40#include "mips64_disassem.h" 39#include "mips64_disassem.h"
41 40
42
43#define NOT_IMPLEMENTED() LOG_ALWAYS_FATAL("Arm instruction %s not yet implemented\n", __func__) 41#define NOT_IMPLEMENTED() LOG_ALWAYS_FATAL("Arm instruction %s not yet implemented\n", __func__)
44 42
45
46// ---------------------------------------------------------------------------- 43// ----------------------------------------------------------------------------
47 44
48namespace android { 45namespace android {
diff --git a/libpixelflinger/codeflinger/MIPSAssembler.cpp b/libpixelflinger/codeflinger/MIPSAssembler.cpp
index ae06a1344..4cddcc85b 100644
--- a/libpixelflinger/codeflinger/MIPSAssembler.cpp
+++ b/libpixelflinger/codeflinger/MIPSAssembler.cpp
@@ -52,13 +52,13 @@
52 52
53#include <stdio.h> 53#include <stdio.h>
54#include <stdlib.h> 54#include <stdlib.h>
55#include <cutils/log.h>
56#include <cutils/properties.h>
57 55
56#include <android/log.h>
57#include <cutils/properties.h>
58#include <private/pixelflinger/ggl_context.h> 58#include <private/pixelflinger/ggl_context.h>
59 59
60#include "MIPSAssembler.h"
61#include "CodeCache.h" 60#include "CodeCache.h"
61#include "MIPSAssembler.h"
62#include "mips_disassem.h" 62#include "mips_disassem.h"
63 63
64// Choose MIPS arch variant following gcc flags 64// Choose MIPS arch variant following gcc flags
diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp
index b20219ced..d4aa47538 100644
--- a/libpixelflinger/codeflinger/blending.cpp
+++ b/libpixelflinger/codeflinger/blending.cpp
@@ -2,30 +2,29 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18#include <assert.h> 18#include <assert.h>
19#include <stdint.h> 19#include <stdint.h>
20#include <stdlib.h>
21#include <stdio.h> 20#include <stdio.h>
21#include <stdlib.h>
22#include <sys/types.h> 22#include <sys/types.h>
23 23
24#include <cutils/log.h> 24#include <android/log.h>
25 25
26#include "GGLAssembler.h" 26#include "GGLAssembler.h"
27 27
28
29namespace android { 28namespace android {
30 29
31void GGLAssembler::build_fog( 30void GGLAssembler::build_fog(
diff --git a/libpixelflinger/codeflinger/load_store.cpp b/libpixelflinger/codeflinger/load_store.cpp
index e5a1ae010..d68f6dc73 100644
--- a/libpixelflinger/codeflinger/load_store.cpp
+++ b/libpixelflinger/codeflinger/load_store.cpp
@@ -2,22 +2,24 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18#include <assert.h> 18#include <assert.h>
19#include <stdio.h> 19#include <stdio.h>
20#include <cutils/log.h> 20
21#include <android/log.h>
22
21#include "GGLAssembler.h" 23#include "GGLAssembler.h"
22 24
23namespace android { 25namespace android {
@@ -25,7 +27,7 @@ namespace android {
25// ---------------------------------------------------------------------------- 27// ----------------------------------------------------------------------------
26 28
27void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags) 29void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags)
28{ 30{
29 const int bits = addr.size; 31 const int bits = addr.size;
30 const int inc = (flags & WRITE_BACK)?1:0; 32 const int inc = (flags & WRITE_BACK)?1:0;
31 switch (bits) { 33 switch (bits) {
@@ -59,8 +61,8 @@ void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags
59} 61}
60 62
61void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags) 63void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
62{ 64{
63 Scratch scratches(registerFile()); 65 Scratch scratches(registerFile());
64 int s0; 66 int s0;
65 67
66 const int bits = addr.size; 68 const int bits = addr.size;
@@ -72,7 +74,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
72 break; 74 break;
73 case 24: 75 case 24:
74 // 24 bits formats are a little special and used only for RGB 76 // 24 bits formats are a little special and used only for RGB
75 // R,G,B is packed as 0x00BBGGRR 77 // R,G,B is packed as 0x00BBGGRR
76 s0 = scratches.obtain(); 78 s0 = scratches.obtain();
77 if (s.reg != addr.reg) { 79 if (s.reg != addr.reg) {
78 LDRB(AL, s.reg, addr.reg, immed12_pre(0)); // R 80 LDRB(AL, s.reg, addr.reg, immed12_pre(0)); // R
@@ -90,7 +92,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
90 } 92 }
91 if (inc) 93 if (inc)
92 ADD(AL, 0, addr.reg, addr.reg, imm(3)); 94 ADD(AL, 0, addr.reg, addr.reg, imm(3));
93 break; 95 break;
94 case 16: 96 case 16:
95 if (inc) LDRH(AL, s.reg, addr.reg, immed8_post(2)); 97 if (inc) LDRH(AL, s.reg, addr.reg, immed8_post(2));
96 else LDRH(AL, s.reg, addr.reg); 98 else LDRH(AL, s.reg, addr.reg);
@@ -112,7 +114,7 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
112 assert(maskLen<=8); 114 assert(maskLen<=8);
113#endif 115#endif
114 assert(h); 116 assert(h);
115 117
116 if (h != bits) { 118 if (h != bits) {
117 const int mask = ((1<<maskLen)-1) << l; 119 const int mask = ((1<<maskLen)-1) << l;
118 if (isValidImmediate(mask)) { 120 if (isValidImmediate(mask)) {
@@ -126,12 +128,12 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
126 } 128 }
127 s = d.reg; 129 s = d.reg;
128 } 130 }
129 131
130 if (l) { 132 if (l) {
131 MOV(AL, 0, d.reg, reg_imm(s, LSR, l)); // component = packed >> l; 133 MOV(AL, 0, d.reg, reg_imm(s, LSR, l)); // component = packed >> l;
132 s = d.reg; 134 s = d.reg;
133 } 135 }
134 136
135 if (s != d.reg) { 137 if (s != d.reg) {
136 MOV(AL, 0, d.reg, s); 138 MOV(AL, 0, d.reg, s);
137 } 139 }
@@ -212,12 +214,12 @@ void GGLAssembler::expand(integer_t& dst, const integer_t& src, int dbits)
212 } while(dbits>0); 214 } while(dbits>0);
213 return; 215 return;
214 } 216 }
215 217
216 dbits -= sbits; 218 dbits -= sbits;
217 do { 219 do {
218 ORR(AL, 0, d, s, reg_imm(s, LSL, sbits)); 220 ORR(AL, 0, d, s, reg_imm(s, LSL, sbits));
219 // d |= d<<sbits; 221 // d |= d<<sbits;
220 s = d; 222 s = d;
221 dbits -= sbits; 223 dbits -= sbits;
222 if (sbits*2 < dbits) { 224 if (sbits*2 < dbits) {
223 sbits *= 2; 225 sbits *= 2;
@@ -241,14 +243,14 @@ void GGLAssembler::downshift(
241 int dl = d.format.c[component].l; 243 int dl = d.format.c[component].l;
242 int dbits = dh - dl; 244 int dbits = dh - dl;
243 int dithering = 0; 245 int dithering = 0;
244 246
245 ALOGE_IF(sbits<dbits, "sbits (%d) < dbits (%d) in downshift", sbits, dbits); 247 ALOGE_IF(sbits<dbits, "sbits (%d) < dbits (%d) in downshift", sbits, dbits);
246 248
247 if (sbits>dbits) { 249 if (sbits>dbits) {
248 // see if we need to dither 250 // see if we need to dither
249 dithering = mDithering; 251 dithering = mDithering;
250 } 252 }
251 253
252 int ireg = d.reg; 254 int ireg = d.reg;
253 if (!(d.flags & FIRST)) { 255 if (!(d.flags & FIRST)) {
254 if (s.flags & CORRUPTIBLE) { 256 if (s.flags & CORRUPTIBLE) {
@@ -271,7 +273,7 @@ void GGLAssembler::downshift(
271 if (isValidImmediate(mask) || isValidImmediate(~mask)) { 273 if (isValidImmediate(mask) || isValidImmediate(~mask)) {
272 build_and_immediate(ireg, s.reg, mask, 32); 274 build_and_immediate(ireg, s.reg, mask, 32);
273 sl = offset; 275 sl = offset;
274 s.reg = ireg; 276 s.reg = ireg;
275 sbits = dbits; 277 sbits = dbits;
276 maskLoBits = maskHiBits = 0; 278 maskLoBits = maskHiBits = 0;
277 } 279 }
@@ -281,7 +283,7 @@ void GGLAssembler::downshift(
281 const uint32_t mask = ((1<<sbits)-1) << sl; 283 const uint32_t mask = ((1<<sbits)-1) << sl;
282 if (isValidImmediate(mask) || isValidImmediate(~mask)) { 284 if (isValidImmediate(mask) || isValidImmediate(~mask)) {
283 build_and_immediate(ireg, s.reg, mask, 32); 285 build_and_immediate(ireg, s.reg, mask, 32);
284 s.reg = ireg; 286 s.reg = ireg;
285 maskLoBits = maskHiBits = 0; 287 maskLoBits = maskHiBits = 0;
286 } 288 }
287 } 289 }
@@ -325,7 +327,7 @@ void GGLAssembler::downshift(
325 MOV(AL, 0, ireg, reg_imm(s.reg, LSR, sl)); 327 MOV(AL, 0, ireg, reg_imm(s.reg, LSR, sl));
326 sh -= sl; 328 sh -= sl;
327 sl = 0; 329 sl = 0;
328 s.reg = ireg; 330 s.reg = ireg;
329 } 331 }
330 // scaling (V-V>>dbits) 332 // scaling (V-V>>dbits)
331 SUB(AL, 0, ireg, s.reg, reg_imm(s.reg, LSR, dbits)); 333 SUB(AL, 0, ireg, s.reg, reg_imm(s.reg, LSR, dbits));
@@ -333,7 +335,7 @@ void GGLAssembler::downshift(
333 if (shift>0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSR, shift)); 335 if (shift>0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSR, shift));
334 else if (shift<0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSL,-shift)); 336 else if (shift<0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSL,-shift));
335 else ADD(AL, 0, ireg, ireg, dither.reg); 337 else ADD(AL, 0, ireg, ireg, dither.reg);
336 s.reg = ireg; 338 s.reg = ireg;
337 } 339 }
338 340
339 if ((maskLoBits|dithering) && (sh > dbits)) { 341 if ((maskLoBits|dithering) && (sh > dbits)) {
diff --git a/libpixelflinger/codeflinger/mips64_disassem.c b/libpixelflinger/codeflinger/mips64_disassem.c
index 44b7fe7cd..f28d72627 100644
--- a/libpixelflinger/codeflinger/mips64_disassem.c
+++ b/libpixelflinger/codeflinger/mips64_disassem.c
@@ -34,21 +34,20 @@
34 * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93 34 * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93
35 */ 35 */
36 36
37#include <stdio.h>
38#include <stdint.h>
39#include <stdarg.h> 37#include <stdarg.h>
40#include <stdbool.h> 38#include <stdbool.h>
39#include <stdint.h>
40#include <stdio.h>
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42
43#include <sys/types.h> 42#include <sys/types.h>
44#include "mips_opcode.h"
45 43
46#include <cutils/log.h> 44#include <android/log.h>
45
46#include "mips_opcode.h"
47 47
48static char *sprintf_buffer; 48static char *sprintf_buffer;
49static int sprintf_buf_len; 49static int sprintf_buf_len;
50 50
51
52typedef uint64_t db_addr_t; 51typedef uint64_t db_addr_t;
53static void db_printf(const char* fmt, ...); 52static void db_printf(const char* fmt, ...);
54 53
diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp
index 29a3742c1..d66981dad 100644
--- a/libpixelflinger/codeflinger/texturing.cpp
+++ b/libpixelflinger/codeflinger/texturing.cpp
@@ -2,26 +2,26 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18#include <assert.h> 18#include <assert.h>
19#include <stdint.h> 19#include <stdint.h>
20#include <stdlib.h>
21#include <stdio.h> 20#include <stdio.h>
21#include <stdlib.h>
22#include <sys/types.h> 22#include <sys/types.h>
23 23
24#include <cutils/log.h> 24#include <android/log.h>
25 25
26#include "GGLAssembler.h" 26#include "GGLAssembler.h"
27 27
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp
index aa1836053..1a2f6fb91 100644
--- a/libpixelflinger/scanline.cpp
+++ b/libpixelflinger/scanline.cpp
@@ -2,29 +2,28 @@
2** 2**
3** Copyright 2006-2011, The Android Open Source Project 3** Copyright 2006-2011, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
18
19#define LOG_TAG "pixelflinger" 18#define LOG_TAG "pixelflinger"
20 19
21#include <assert.h> 20#include <assert.h>
22#include <stdlib.h>
23#include <stdio.h> 21#include <stdio.h>
22#include <stdlib.h>
24#include <string.h> 23#include <string.h>
25 24
25#include <android/log.h>
26#include <cutils/memory.h> 26#include <cutils/memory.h>
27#include <cutils/log.h>
28 27
29#include "buffer.h" 28#include "buffer.h"
30#include "scanline.h" 29#include "scanline.h"
diff --git a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
index e8c4626b2..9fb0a2802 100644
--- a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
+++ b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
@@ -26,21 +26,21 @@
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <errno.h>
30#define __STDC_FORMAT_MACROS
31#include <inttypes.h>
29#include <stdio.h> 32#include <stdio.h>
30#include <stdlib.h> 33#include <stdlib.h>
31#include <string.h> 34#include <string.h>
35#include <sys/mman.h>
32#include <unistd.h> 36#include <unistd.h>
33#include <errno.h>
34 37
35#include <sys/mman.h> 38#include <android/log.h>
36#include <cutils/ashmem.h> 39#include <cutils/ashmem.h>
37#include <cutils/log.h>
38
39#define __STDC_FORMAT_MACROS
40#include <inttypes.h>
41 40
42#include "codeflinger/ARMAssemblerInterface.h" 41#include "codeflinger/ARMAssemblerInterface.h"
43#include "codeflinger/MIPS64Assembler.h" 42#include "codeflinger/MIPS64Assembler.h"
43
44using namespace android; 44using namespace android;
45 45
46#define TESTS_DATAOP_ENABLE 1 46#define TESTS_DATAOP_ENABLE 1
diff --git a/libpixelflinger/trap.cpp b/libpixelflinger/trap.cpp
index ea5362553..f00e50aee 100644
--- a/libpixelflinger/trap.cpp
+++ b/libpixelflinger/trap.cpp
@@ -2,16 +2,16 @@
2** 2**
3** Copyright 2006, The Android Open Source Project 3** Copyright 2006, The Android Open Source Project
4** 4**
5** Licensed under the Apache License, Version 2.0 (the "License"); 5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License. 6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at 7** You may obtain a copy of the License at
8** 8**
9** http://www.apache.org/licenses/LICENSE-2.0 9** http://www.apache.org/licenses/LICENSE-2.0
10** 10**
11** Unless required by applicable law or agreed to in writing, software 11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS, 12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and 14** See the License for the specific language governing permissions and
15** limitations under the License. 15** limitations under the License.
16*/ 16*/
17 17
@@ -19,12 +19,12 @@
19#include <stdio.h> 19#include <stdio.h>
20#include <stdlib.h> 20#include <stdlib.h>
21 21
22#include <android/log.h>
23#include <cutils/memory.h>
24
22#include "trap.h" 25#include "trap.h"
23#include "picker.h" 26#include "picker.h"
24 27
25#include <cutils/log.h>
26#include <cutils/memory.h>
27
28namespace android { 28namespace android {
29 29
30// ---------------------------------------------------------------------------- 30// ----------------------------------------------------------------------------