description: don't set sse2 compiler flags on i386 author: Michael Gilbert debian-bug: http://bugs.debian.org/750361 Index: chromium-89.0.4389.23/media/base/sinc_resampler.cc =================================================================== --- chromium-89.0.4389.23.orig/media/base/sinc_resampler.cc +++ chromium-89.0.4389.23/media/base/sinc_resampler.cc @@ -83,7 +83,7 @@ #include "build/build_config.h" #include "cc/base/math_util.h" -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) #include #define CONVOLVE_FUNC Convolve_SSE #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) @@ -344,7 +344,7 @@ float SincResampler::Convolve_C(const fl kernel_interpolation_factor * sum2); } -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { Index: chromium-89.0.4389.23/media/base/sinc_resampler.h =================================================================== --- chromium-89.0.4389.23.orig/media/base/sinc_resampler.h +++ chromium-89.0.4389.23/media/base/sinc_resampler.h @@ -102,7 +102,7 @@ class MEDIA_EXPORT SincResampler { // ARM, NEON support is chosen at compile time based on compilation flags. static float Convolve_C(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor); -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) static float Convolve_SSE(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor); Index: chromium-89.0.4389.23/media/base/sinc_resampler_perftest.cc =================================================================== --- chromium-89.0.4389.23.orig/media/base/sinc_resampler_perftest.cc +++ chromium-89.0.4389.23/media/base/sinc_resampler_perftest.cc @@ -19,7 +19,7 @@ static const double kSampleRateRatio = 1 static const double kKernelInterpolationFactor = 0.5; // Define platform independent function name for Convolve* tests. -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) #define CONVOLVE_FUNC Convolve_SSE #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) #define CONVOLVE_FUNC Convolve_NEON Index: chromium-89.0.4389.23/media/base/sinc_resampler_unittest.cc =================================================================== --- chromium-89.0.4389.23.orig/media/base/sinc_resampler_unittest.cc +++ chromium-89.0.4389.23/media/base/sinc_resampler_unittest.cc @@ -150,7 +150,7 @@ TEST(SincResamplerTest, DISABLED_SetRati // Define platform independent function name for Convolve* tests. -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) #define CONVOLVE_FUNC Convolve_SSE #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) #define CONVOLVE_FUNC Convolve_NEON Index: chromium-89.0.4389.23/media/base/vector_math.cc =================================================================== --- chromium-89.0.4389.23.orig/media/base/vector_math.cc +++ chromium-89.0.4389.23/media/base/vector_math.cc @@ -12,7 +12,7 @@ #include "build/build_config.h" // NaCl does not allow intrinsics. -#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +#if defined(__x86_64__) && !defined(OS_NACL) #include // Don't use custom SSE versions where the auto-vectorized C version performs // better, which is anywhere clang is used. @@ -82,7 +82,7 @@ std::pair EWMAAndMaxPower_ return result; } -#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +#if defined(__x86_64__) && !defined(OS_NACL) void FMUL_SSE(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; const int last_index = len - rem; Index: chromium-89.0.4389.23/media/base/vector_math_perftest.cc =================================================================== --- chromium-89.0.4389.23.orig/media/base/vector_math_perftest.cc +++ chromium-89.0.4389.23/media/base/vector_math_perftest.cc @@ -87,7 +87,7 @@ class VectorMathPerfTest : public testin }; // Define platform dependent function names for SIMD optimized methods. -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(__x86_64__) #define FMAC_FUNC FMAC_SSE #define FMUL_FUNC FMUL_SSE #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE Index: chromium-89.0.4389.23/media/base/vector_math_testing.h =================================================================== --- chromium-89.0.4389.23.orig/media/base/vector_math_testing.h +++ chromium-89.0.4389.23/media/base/vector_math_testing.h @@ -28,7 +28,7 @@ MEDIA_SHMEM_EXPORT std::pair& result = vector_math::EWMAAndMaxPower_SSE( Index: chromium-89.0.4389.23/skia/ext/convolver.h =================================================================== --- chromium-89.0.4389.23.orig/skia/ext/convolver.h +++ chromium-89.0.4389.23/skia/ext/convolver.h @@ -17,7 +17,6 @@ // We can build SSE2 optimized versions for all x86 CPUs // except when building for the IOS emulator. #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_IOS) -#define SIMD_SSE2 1 #define SIMD_PADDING 8 // 8 * int16_t #endif Index: chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/direct_convolver.cc =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/platform/audio/direct_convolver.cc +++ chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/direct_convolver.cc @@ -37,7 +37,7 @@ #include #endif -#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_MAC) +#if defined(ARCH_CPU_X86_64) && !defined(OS_MAC) #include #endif Index: chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/sinc_resampler.cc =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/platform/audio/sinc_resampler.cc +++ chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/sinc_resampler.cc @@ -32,7 +32,7 @@ #include "third_party/blink/renderer/platform/audio/audio_bus.h" #include "third_party/blink/renderer/platform/wtf/math_extras.h" -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) #include #endif @@ -273,7 +273,7 @@ void SincResampler::Process(AudioSourceP { float input; -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) // If the sourceP address is not 16-byte aligned, the first several // frames (at most three) should be processed seperately. while ((reinterpret_cast(input_p) & 0x0F) && n) { Index: chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/vector_math.cc =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/platform/audio/vector_math.cc +++ chromium-89.0.4389.23/third_party/blink/renderer/platform/audio/vector_math.cc @@ -37,7 +37,7 @@ #include "third_party/blink/renderer/platform/audio/cpu/arm/vector_math_neon.h" #elif defined(HAVE_MIPS_MSA_INTRINSICS) #include "third_party/blink/renderer/platform/audio/cpu/mips/vector_math_msa.h" -#elif defined(ARCH_CPU_X86_FAMILY) +#elif defined(ARCH_CPU_X86_64) #include "third_party/blink/renderer/platform/audio/cpu/x86/vector_math_x86.h" #else #include "third_party/blink/renderer/platform/audio/vector_math_scalar.h" @@ -54,7 +54,7 @@ namespace impl = mac; namespace impl = neon; #elif defined(HAVE_MIPS_MSA_INTRINSICS) namespace impl = msa; -#elif defined(ARCH_CPU_X86_FAMILY) +#elif defined(ARCH_CPU_X86_64) namespace impl = x86; #else namespace impl = scalar; @@ -70,7 +70,7 @@ void PrepareFilterForConv(const float* f // vectors are not implemented by all implementations. DCHECK_EQ(-1, filter_stride); DCHECK(prepared_filter); -#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_MAC) +#if defined(ARCH_CPU_X86_64) && !defined(OS_MAC) x86::PrepareFilterForConv(filter_p, filter_stride, filter_size, prepared_filter); #endif Index: chromium-89.0.4389.23/third_party/blink/renderer/platform/graphics/cpu/x86/webgl_image_conversion_sse.h =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/platform/graphics/cpu/x86/webgl_image_conversion_sse.h +++ chromium-89.0.4389.23/third_party/blink/renderer/platform/graphics/cpu/x86/webgl_image_conversion_sse.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) #include namespace blink { @@ -195,6 +195,6 @@ ALWAYS_INLINE void PackOneRowOfRGBA8Litt } // namespace simd } // namespace blink -#endif // ARCH_CPU_X86_FAMILY +#endif // ARCH_CPU_X86_64 #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_CPU_X86_WEBGL_IMAGE_CONVERSION_SSE_H_ Index: chromium-89.0.4389.23/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc +++ chromium-89.0.4389.23/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc @@ -886,7 +886,7 @@ void Unpack(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) simd::UnpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixels_per_row); #endif @@ -914,7 +914,7 @@ void Unpack(const uint8_t* source, uint8_t* destination, unsigned pixels_per_row) { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) simd::PackOneRowOfRGBA8LittleToR8(source, destination, pixels_per_row); #endif #if defined(HAVE_MIPS_MSA_INTRINSICS) @@ -1364,7 +1364,7 @@ void Pack(const uint8_t* source, uint8_t* destination, unsigned pixels_per_row) { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) simd::PackOneRowOfRGBA8LittleToRA8(source, destination, pixels_per_row); #endif #if defined(HAVE_MIPS_MSA_INTRINSICS) @@ -1557,7 +1557,7 @@ void Pack(const uint8_t* source, uint8_t* destination, unsigned pixels_per_row) { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) simd::PackOneRowOfRGBA8LittleToRGBA8(source, destination, pixels_per_row); #endif #if defined(HAVE_MIPS_MSA_INTRINSICS) Index: chromium-89.0.4389.23/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc =================================================================== --- chromium-89.0.4389.23.orig/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc +++ chromium-89.0.4389.23/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc @@ -38,7 +38,7 @@ #include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/wtf/math_extras.h" -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) #include #endif @@ -1439,7 +1439,7 @@ std::tuple Audi size_t current_frame, float value, unsigned write_index) { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) auto number_of_values = current_state.number_of_values; #endif auto fill_to_frame = current_state.fill_to_frame; @@ -1457,7 +1457,7 @@ std::tuple Audi float k = delta_time <= std::numeric_limits::min() ? 0 : 1 / delta_time; const float value_delta = value2 - value1; -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) if (fill_to_frame > write_index) { // Minimize in-loop operations. Calculate starting value and increment. // Next step: value += inc. @@ -1585,7 +1585,7 @@ std::tuple Audi size_t current_frame, float value, unsigned write_index) { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) auto number_of_values = current_state.number_of_values; #endif auto fill_to_frame = current_state.fill_to_frame; @@ -1637,7 +1637,7 @@ std::tuple Audi for (; write_index < fill_to_frame; ++write_index) values[write_index] = target; } else { -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) if (fill_to_frame > write_index) { // Resolve recursion by expanding constants to achieve a 4-step // loop unrolling. @@ -1771,7 +1771,7 @@ std::tuple Audi // Oversampled curve data can be provided if sharp discontinuities are // desired. unsigned k = 0; -#if defined(ARCH_CPU_X86_FAMILY) +#if defined(ARCH_CPU_X86_64) if (fill_to_frame > write_index) { const __m128 v_curve_virtual_index = _mm_set_ps1(curve_virtual_index); const __m128 v_curve_points_per_frame = _mm_set_ps1(curve_points_per_frame);