summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2014-12-03 21:32:01 -0600
committerElliott Hughes2014-12-03 21:35:16 -0600
commitd05f1d51ad4869f51913decc8bbb7931fc8f5d66 (patch)
treeb63c24de3da86ac977d610f49f34f41da7e7b675 /libpixelflinger
parent6855af4135c9cd29a42f7c22ca7c394d902faea5 (diff)
downloadplatform-system-core-d05f1d51ad4869f51913decc8bbb7931fc8f5d66.tar.gz
platform-system-core-d05f1d51ad4869f51913decc8bbb7931fc8f5d66.tar.xz
platform-system-core-d05f1d51ad4869f51913decc8bbb7931fc8f5d66.zip
Remove dead code.
Intel accidentally made this dead code in 2010 with commit 2bef93cc20155c3a59cdbb22c564c4b385b2c160, and no one's ever noticed. Since no one noticing for so long implies that it doesn't matter, let's just kill the supposedly optimized code. Change-Id: Id5b37056cb8884c20bfe2db362e19b46f02e337d
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/codeflinger/load_store.cpp19
-rw-r--r--libpixelflinger/codeflinger/texturing.cpp105
2 files changed, 0 insertions, 124 deletions
diff --git a/libpixelflinger/codeflinger/load_store.cpp b/libpixelflinger/codeflinger/load_store.cpp
index 0a46eaa3c..e5a1ae010 100644
--- a/libpixelflinger/codeflinger/load_store.cpp
+++ b/libpixelflinger/codeflinger/load_store.cpp
@@ -20,10 +20,6 @@
20#include <cutils/log.h> 20#include <cutils/log.h>
21#include "GGLAssembler.h" 21#include "GGLAssembler.h"
22 22
23#ifdef __ARM_ARCH__
24#include <machine/cpu-features.h>
25#endif
26
27namespace android { 23namespace android {
28 24
29// ---------------------------------------------------------------------------- 25// ----------------------------------------------------------------------------
@@ -117,20 +113,6 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
117#endif 113#endif
118 assert(h); 114 assert(h);
119 115
120#if __ARM_ARCH__ >= 7
121 const int mask = (1<<maskLen)-1;
122 if ((h == bits) && !l && (s != d.reg)) {
123 MOV(AL, 0, d.reg, s); // component = packed;
124 } else if ((h == bits) && l) {
125 MOV(AL, 0, d.reg, reg_imm(s, LSR, l)); // component = packed >> l;
126 } else if (!l && isValidImmediate(mask)) {
127 AND(AL, 0, d.reg, s, imm(mask)); // component = packed & mask;
128 } else if (!l && isValidImmediate(~mask)) {
129 BIC(AL, 0, d.reg, s, imm(~mask)); // component = packed & mask;
130 } else {
131 UBFX(AL, d.reg, s, l, maskLen); // component = (packed & mask) >> l;
132 }
133#else
134 if (h != bits) { 116 if (h != bits) {
135 const int mask = ((1<<maskLen)-1) << l; 117 const int mask = ((1<<maskLen)-1) << l;
136 if (isValidImmediate(mask)) { 118 if (isValidImmediate(mask)) {
@@ -153,7 +135,6 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
153 if (s != d.reg) { 135 if (s != d.reg) {
154 MOV(AL, 0, d.reg, s); 136 MOV(AL, 0, d.reg, s);
155 } 137 }
156#endif
157 138
158 d.s = maskLen; 139 d.s = maskLen;
159} 140}
diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp
index 81950bfdc..29a3742c1 100644
--- a/libpixelflinger/codeflinger/texturing.cpp
+++ b/libpixelflinger/codeflinger/texturing.cpp
@@ -25,10 +25,6 @@
25 25
26#include "GGLAssembler.h" 26#include "GGLAssembler.h"
27 27
28#ifdef __ARM_ARCH__
29#include <machine/cpu-features.h>
30#endif
31
32namespace android { 28namespace android {
33 29
34// --------------------------------------------------------------------------- 30// ---------------------------------------------------------------------------
@@ -888,106 +884,6 @@ void GGLAssembler::filter24(
888 load(txPtr, texel, 0); 884 load(txPtr, texel, 0);
889} 885}
890 886
891#if __ARM_ARCH__ >= 6
892// ARMv6 version, using UXTB16, and scheduled for Cortex-A8 pipeline
893void GGLAssembler::filter32(
894 const fragment_parts_t& parts,
895 pixel_t& texel, const texture_unit_t& tmu,
896 int U, int V, pointer_t& txPtr,
897 int FRAC_BITS)
898{
899 const int adjust = FRAC_BITS*2 - 8;
900 const int round = 0;
901 const int prescale = 16 - adjust;
902
903 Scratch scratches(registerFile());
904
905 int pixel= scratches.obtain();
906 int dh = scratches.obtain();
907 int u = scratches.obtain();
908 int k = scratches.obtain();
909
910 int temp = scratches.obtain();
911 int dl = scratches.obtain();
912
913 int offsetrt = scratches.obtain();
914 int offsetlb = scratches.obtain();
915
916 int pixellb = offsetlb;
917
918 // RB -> U * V
919 CONTEXT_LOAD(offsetrt, generated_vars.rt);
920 CONTEXT_LOAD(offsetlb, generated_vars.lb);
921 if(!round) {
922 MOV(AL, 0, U, reg_imm(U, LSL, prescale));
923 }
924 ADD(AL, 0, u, offsetrt, offsetlb);
925
926 LDR(AL, pixel, txPtr.reg, reg_scale_pre(u));
927 if (round) {
928 SMULBB(AL, u, U, V);
929 RSB(AL, 0, U, U, imm(1<<FRAC_BITS));
930 } else {
931 SMULWB(AL, u, U, V);
932 RSB(AL, 0, U, U, imm(1<<(FRAC_BITS+prescale)));
933 }
934 UXTB16(AL, temp, pixel, 0);
935 if (round) {
936 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
937 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
938 }
939 LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb));
940 MUL(AL, 0, dh, temp, u);
941 UXTB16(AL, temp, pixel, 8);
942 MUL(AL, 0, dl, temp, u);
943 RSB(AL, 0, k, u, imm(0x100));
944
945 // LB -> (1-U) * V
946 if (round) {
947 SMULBB(AL, u, U, V);
948 } else {
949 SMULWB(AL, u, U, V);
950 }
951 UXTB16(AL, temp, pixellb, 0);
952 if (round) {
953 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
954 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
955 }
956 MLA(AL, 0, dh, temp, u, dh);
957 UXTB16(AL, temp, pixellb, 8);
958 MLA(AL, 0, dl, temp, u, dl);
959 SUB(AL, 0, k, k, u);
960
961 // LT -> (1-U)*(1-V)
962 RSB(AL, 0, V, V, imm(1<<FRAC_BITS));
963 LDR(AL, pixel, txPtr.reg);
964 if (round) {
965 SMULBB(AL, u, U, V);
966 } else {
967 SMULWB(AL, u, U, V);
968 }
969 UXTB16(AL, temp, pixel, 0);
970 if (round) {
971 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
972 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
973 }
974 MLA(AL, 0, dh, temp, u, dh);
975 UXTB16(AL, temp, pixel, 8);
976 MLA(AL, 0, dl, temp, u, dl);
977
978 // RT -> U*(1-V)
979 LDR(AL, pixel, txPtr.reg, reg_scale_pre(offsetrt));
980 SUB(AL, 0, u, k, u);
981 UXTB16(AL, temp, pixel, 0);
982 MLA(AL, 0, dh, temp, u, dh);
983 UXTB16(AL, temp, pixel, 8);
984 MLA(AL, 0, dl, temp, u, dl);
985
986 UXTB16(AL, dh, dh, 8);
987 UXTB16(AL, dl, dl, 8);
988 ORR(AL, 0, texel.reg, dh, reg_imm(dl, LSL, 8));
989}
990#else
991void GGLAssembler::filter32( 887void GGLAssembler::filter32(
992 const fragment_parts_t& /*parts*/, 888 const fragment_parts_t& /*parts*/,
993 pixel_t& texel, const texture_unit_t& /*tmu*/, 889 pixel_t& texel, const texture_unit_t& /*tmu*/,
@@ -1075,7 +971,6 @@ void GGLAssembler::filter32(
1075 AND(AL, 0, dl, dl, reg_imm(mask, LSL, 8)); 971 AND(AL, 0, dl, dl, reg_imm(mask, LSL, 8));
1076 ORR(AL, 0, texel.reg, dh, dl); 972 ORR(AL, 0, texel.reg, dh, dl);
1077} 973}
1078#endif
1079 974
1080void GGLAssembler::build_texture_environment( 975void GGLAssembler::build_texture_environment(
1081 component_t& fragment, 976 component_t& fragment,