mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 05:02:25 +00:00
import from UXP: 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. (cd66a173)
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;
|
||||
|
||||
@@ -3015,7 +3015,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);
|
||||
@@ -3756,7 +3756,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
|
||||
|
||||
Reference in New Issue
Block a user