mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 05:38:39 +00:00
Issue #2354 - Restore ARM32 buildability on Linux. Fix ION breakages due to BigInt changes. Fix breakages from libjpeg, libyuv and libvpx upgrades. Restore ARM(32/64) NEON FPU support in libyuv.
This commit is contained in:
@@ -288,24 +288,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
||||
void visitUDiv(LUDiv* ins);
|
||||
void visitUMod(LUMod* ins);
|
||||
void visitSoftUDivOrMod(LSoftUDivOrMod* ins);
|
||||
|
||||
public:
|
||||
// Unimplemented SIMD instructions
|
||||
void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdReinterpretCast(LSimdReinterpretCast* ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSwizzleI(LSimdSwizzleI* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSwizzleF(LSimdSwizzleF* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
|
||||
};
|
||||
|
||||
typedef CodeGeneratorARM CodeGeneratorSpecific;
|
||||
|
||||
@@ -3013,7 +3013,7 @@ MacroAssemblerARMCompat::testInt32(Condition cond, const BaseIndex& src)
|
||||
return cond;
|
||||
}
|
||||
|
||||
+Assembler::Condition
|
||||
Assembler::Condition
|
||||
MacroAssemblerARMCompat::testBigInt(Condition cond,const BaseIndex& src)
|
||||
{
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
@@ -3766,7 +3766,7 @@ MacroAssemblerARMCompat::testStringTruthy(bool truthy, const ValueOperand& value
|
||||
return truthy ? Assembler::NotEqual : Assembler::Equal;
|
||||
}
|
||||
|
||||
+Assembler::Condition
|
||||
Assembler::Condition
|
||||
MacroAssemblerARMCompat::testBigIntTruthy(bool truthy, const ValueOperand& value)
|
||||
{
|
||||
Register bi = value.payloadReg();
|
||||
|
||||
@@ -201,6 +201,17 @@ ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
// Compile -x as 0 - x.
|
||||
masm.as_rsb(R0.payloadReg(), R0.payloadReg(), Imm8(0));
|
||||
break;
|
||||
case JSOP_INC: {
|
||||
RegisterOrInt32Constant rval = RegisterOrInt32Constant(R0.payloadReg());
|
||||
masm.inc32(&rval);
|
||||
break;
|
||||
}
|
||||
case JSOP_DEC: {
|
||||
RegisterOrInt32Constant rval = RegisterOrInt32Constant(R0.payloadReg());
|
||||
masm.dec32(&rval);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
MOZ_CRASH("Unexpected op");
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
|
||||
'simd/arm/jidctred-neon.c',
|
||||
'simd/arm/jquanti-neon.c',
|
||||
]
|
||||
CFLAGS += ['-mfpu=neon']
|
||||
elif CONFIG['CPU_ARCH'] == 'aarch64':
|
||||
SOURCES += [
|
||||
'simd/jsimd_arm64.c',
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
'defines': [
|
||||
'LIBYUV_NEON',
|
||||
],
|
||||
'cflags!': [
|
||||
'cflags_mozilla!': [
|
||||
'-mfpu=vfp',
|
||||
'-mfpu=vfpv3',
|
||||
'-mfpu=vfpv3-d16',
|
||||
@@ -73,14 +73,14 @@
|
||||
'conditions': [
|
||||
# Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug.
|
||||
['clang == 0 and use_lto == 1', {
|
||||
'cflags!': [
|
||||
'cflags_mozilla!': [
|
||||
'-flto',
|
||||
'-ffat-lto-objects',
|
||||
],
|
||||
}],
|
||||
# arm64 does not need -mfpu=neon option as neon is not optional
|
||||
['target_arch != "arm64"', {
|
||||
'cflags': [
|
||||
'cflags_mozilla': [
|
||||
'-mfpu=neon',
|
||||
# '-marm', # arm32 not thumb
|
||||
],
|
||||
|
||||
+17
-1
@@ -20,10 +20,26 @@ libyuv_non_unified_sources = [
|
||||
'source/scale_common.cc',
|
||||
'source/scale_uv.cc',
|
||||
]
|
||||
|
||||
if CONFIG['CPU_ARCH'] == 'arm':
|
||||
libyuv_non_unified_sources += [
|
||||
'source/compare_neon.cc',
|
||||
'source/rotate_neon.cc',
|
||||
'source/row_neon.cc',
|
||||
'source/scale_neon.cc',
|
||||
]
|
||||
if CONFIG['CPU_ARCH'] == 'aarch64':
|
||||
libyuv_non_unified_sources += [
|
||||
'source/compare_neon64.cc',
|
||||
'source/rotate_neon64.cc',
|
||||
'source/row_neon64.cc',
|
||||
'source/scale_neon64.cc',
|
||||
]
|
||||
|
||||
GYP_DIRS['.'].input = 'libyuv.gyp'
|
||||
GYP_DIRS['.'].variables = gyp_vars
|
||||
GYP_DIRS['.'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
|
||||
GYP_DIRS['.'].non_unified_sources += libyuv_non_unified_sources
|
||||
GYP_DIRS['.'].non_unified_sources += sorted(libyuv_non_unified_sources)
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
GYP_DIRS['.'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
|
||||
|
||||
+1
-1
@@ -2943,7 +2943,7 @@ if test -z "$MOZ_SYSTEM_LIBVPX"; then
|
||||
dnl These flags are a lie; they're just used to enable the requisite
|
||||
dnl opcodes; actual arch detection is done at runtime.
|
||||
VPX_ASFLAGS="-march=armv7-a -mfpu=neon"
|
||||
VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/build/make/ads2gas.pl'
|
||||
VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/libvpx/build/make/ads2gas.pl'
|
||||
VPX_ARM_ASM=1
|
||||
dnl Building with -mfpu=neon requires either the "softfp" or the
|
||||
dnl "hardfp" ABI. Depending on the compiler's default target, and the
|
||||
|
||||
Reference in New Issue
Block a user