Merge pull request #475 from rmottola/master
Intel patches from @rmottola
This commit is contained in:
commit
bd99fc9bfa
|
@ -71,7 +71,9 @@ if CONFIG['MOZ_LINKER']:
|
|||
if CONFIG['HAVE_CLOCK_MONOTONIC']:
|
||||
OS_LIBS += CONFIG['REALTIME_LIBS']
|
||||
|
||||
OS_LIBS += ['-Wl,-stack_size,0x40000000,-stack_addr,0xf0000000']
|
||||
# we build only on Darwin anyway
|
||||
if CONFIG['OS_ARCH'] == 'Darwin' and CONFIG['CPU_TYPE'] == 'ppc':
|
||||
OS_LIBS += ['-Wl,-stack_size,0x40000000,-stack_addr,0xf0000000']
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wshadow']
|
||||
|
|
|
@ -8136,6 +8136,9 @@ else
|
|||
MOZ_ENABLE_SKIA=
|
||||
fi
|
||||
|
||||
dnl force disabling of SKIA totally for FFF, to be optionally re-enabled later
|
||||
MOZ_ENABLE_SKIA=
|
||||
|
||||
MOZ_ARG_ENABLE_BOOL(skia,
|
||||
[ --enable-skia Enable use of Skia],
|
||||
MOZ_ENABLE_SKIA=1,
|
||||
|
|
|
@ -479,16 +479,16 @@ MacOSFontEntry::GetFontTable(uint32_t aTag)
|
|||
if (fontRef == kInvalidFont) return nullptr;
|
||||
|
||||
ByteCount dataLength = 0;
|
||||
|
||||
|
||||
if (!mIsDataUserFont || mIsLocalUserFont) TryGlobalFontTableCache();
|
||||
|
||||
|
||||
// See if we already know how long the table is. This saves a potentially
|
||||
// expensive call to ATSGetFontTable() to simply get the length.
|
||||
// Essentially a hardcoded form of FindTagInTableDir; see below.
|
||||
if (MOZ_LIKELY(mFontTableDirSize > 0)) {
|
||||
// XXX: This assumes big endian (warning Intel)
|
||||
uint32_t aTagHE = aTag;
|
||||
#ifndef __ppc__
|
||||
#warning needs GetFontTable fast path needs little endian version
|
||||
aTagHE = __builtin_bswap32(aTag);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_X
|
||||
|
@ -500,19 +500,23 @@ MacOSFontEntry::GetFontTable(uint32_t aTag)
|
|||
uint32_t i;
|
||||
uint32_t *wtable = (reinterpret_cast<uint32_t *>(
|
||||
mFontTableDir.Elements()));
|
||||
|
||||
for (i=3; i<(mFontTableDirSize/4); i+=4) { // Skip header
|
||||
#ifdef DEBUG_X
|
||||
char tag[5] = { table[j], table[j+1], table[j+2], table[j+3],
|
||||
'\0' };
|
||||
fprintf(stderr, "%s ", tag); // remember: big endian
|
||||
fprintf(stderr, "%s ", tag); // remember: host endian
|
||||
j += 16;
|
||||
#endif
|
||||
// ASSUME THAT aTag is already big endian
|
||||
if(wtable[i] == aTag) {
|
||||
#ifdef DEBUG_X
|
||||
fprintf(stderr, "MATCH: length %i\n", wtable[i+3]);
|
||||
#endif
|
||||
// ASSUME THAT aTag is in host endianness
|
||||
if(wtable[i] == aTagHE) {
|
||||
dataLength = (ByteCount)wtable[i+3];
|
||||
#ifndef __ppc__
|
||||
dataLength = __builtin_bswap32(dataLength);
|
||||
#endif
|
||||
#ifdef DEBUG_X
|
||||
fprintf(stderr, "FF MATCH: length %u\n", dataLength);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -559,6 +563,11 @@ static bool FindTagInTableDir(FallibleTArray<uint8_t>& table,
|
|||
// corresponding to the tag, checksum, offset and length, with a
|
||||
// 96 bit header (three 32-bit words). One day we could even write
|
||||
// an AltiVec version ...
|
||||
// aTableTag is expected to be Big Endian order
|
||||
#ifndef __ppc__
|
||||
aTableTag = __builtin_bswap32(aTableTag);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_X
|
||||
fprintf(stderr, "Tables: ");
|
||||
uint32_t j = 12;
|
||||
|
@ -571,7 +580,7 @@ static bool FindTagInTableDir(FallibleTArray<uint8_t>& table,
|
|||
fprintf(stderr, "%s ", tag); // remember: big endian
|
||||
j+=16;
|
||||
#endif
|
||||
// ASSUME THAT aTableTag is already big endian
|
||||
// ASSUME THAT aTableTag is already big endian (we converted it in case)
|
||||
if(wtable[i] == aTableTag) {
|
||||
#ifdef DEBUG_X
|
||||
fprintf(stderr, "MATCH\n");
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
. $topsrcdir/browser/config/mozconfig
|
||||
export CC="/opt/local/bin/gcc-mp-4.8 -flax-vector-conversions -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
|
||||
export CXX="/opt/local/bin/g++-mp-4.8 -flax-vector-conversions -fpermissive -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg
|
||||
mk_add_options MOZ_MAKE_FLAGS="-s -j2"
|
||||
mk_add_options AUTOCONF=autoconf213
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-static
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --disable-cpp-exceptions
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --enable-printing
|
||||
ac_add_options --enable-prebinding
|
||||
ac_add_options --enable-macos-target=10.4
|
||||
ac_add_options --enable-chrome-format=jar
|
||||
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
|
||||
ac_add_options --enable-strip
|
||||
ac_add_options --enable-install-strip
|
||||
ac_add_options --with-distribution-id=com.floodgap
|
||||
ac_add_options --enable-webrtc
|
||||
|
||||
ac_add_options --disable-ion
|
||||
ac_add_options --disable-ctypes
|
|
@ -3161,13 +3161,17 @@ elif test "$CPU_ARCH" = "mips32"; then
|
|||
elif test "$CPU_ARCH" = "mips64"; then
|
||||
AC_DEFINE(JS_CODEGEN_MIPS64)
|
||||
JS_CODEGEN_MIPS64=1
|
||||
elif test "$CPU_ARCH" = "ppc"; then
|
||||
AC_DEFINE(JS_CODEGEN_PPC_OSX)
|
||||
JS_CODEGEN_PPC_OSX=1
|
||||
elif test "$CPU_ARCH" = "ppc64"; then
|
||||
AC_DEFINE(JS_CODEGEN_PPC_OSX)
|
||||
JS_CODEGEN_PPC_OSX=1
|
||||
fi
|
||||
|
||||
dnl Hey, Mozilla, bite me.
|
||||
dnl Eventually we will expunge the old JS_CPU_PPC_OSX.
|
||||
dnl
|
||||
AC_DEFINE(JS_CODEGEN_PPC_OSX)
|
||||
JS_CODEGEN_PPC_OSX=1
|
||||
AC_SUBST(JS_CODEGEN_PPC_OSX)
|
||||
AC_SUBST(JS_CPU_PPC_OSX)
|
||||
|
||||
|
|
|
@ -315,7 +315,9 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only)
|
|||
masm.jump(&start_label_);
|
||||
|
||||
// Exit code:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
BufferOffset bo_exit1, bo_exit2;
|
||||
#endif
|
||||
if (success_label_.used()) {
|
||||
MOZ_ASSERT(num_saved_registers_ > 0);
|
||||
|
||||
|
|
|
@ -2542,7 +2542,7 @@ ICGetElem_Arguments::Compiler::generateStubCode(MacroAssembler& masm)
|
|||
AllocatableGeneralRegisterSet regs(availableGeneralRegs(2));
|
||||
Register scratchReg = regs.takeAny();
|
||||
|
||||
#if(0)
|
||||
#ifndef JS_CODEGEN_PPC_OSX
|
||||
// Guard on input being an arguments object.
|
||||
masm.branchTestObject(Assembler::NotEqual, R0, &failure);
|
||||
Register objReg = masm.extractObject(R0, ExtractTemp0);
|
||||
|
|
|
@ -1029,7 +1029,9 @@ CodeGenerator::visitValueToString(LValueToString* lir)
|
|||
StoreRegisterTo(output));
|
||||
|
||||
Label done;
|
||||
#ifdef JS_CODEGEN_PPC_OSX
|
||||
BufferOffset bo_done1, bo_done2, bo_done3, bo_done4, bo_done5, bo_done6;
|
||||
#endif
|
||||
Register tag = masm.splitTagForTest(input);
|
||||
const JSAtomState& names = GetJitContext()->runtime->names();
|
||||
|
||||
|
|
|
@ -310,20 +310,40 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T& src, AnyRegi
|
|||
load8ZeroExtend(src, dest.gpr());
|
||||
break;
|
||||
case Scalar::Int16:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load16SignExtendSwapped(src, dest.gpr());
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load16SignExtend(src, dest.gpr());
|
||||
#endif
|
||||
break;
|
||||
case Scalar::Uint16:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load16ZeroExtendSwapped(src, dest.gpr());
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load16ZeroExtend(src, dest.gpr());
|
||||
#endif
|
||||
break;
|
||||
case Scalar::Int32:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load32ByteSwapped(src, dest.gpr());
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load32Byte(src, dest.gpr());
|
||||
#endif
|
||||
break;
|
||||
case Scalar::Uint32:
|
||||
if (dest.isFloat()) {
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load32ByteSwapped(src, temp);
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load32Byte(src, temp);
|
||||
#endif
|
||||
convertUInt32ToDouble(temp, dest.fpu());
|
||||
} else {
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load32ByteSwapped(src, dest.gpr());
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load32Byte(src, temp);
|
||||
#endif
|
||||
|
||||
// Bail out if the value doesn't fit into a signed int32 value. This
|
||||
// is what allows MLoadUnboxedScalar to have a type() of
|
||||
|
@ -491,7 +511,11 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T& src, const V
|
|||
break;
|
||||
case Scalar::Uint32:
|
||||
// Don't clobber dest when we could fail, instead use temp.
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
load32ByteSwapped(src, temp);
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
load32(src, temp);
|
||||
#endif
|
||||
if (allowDouble) {
|
||||
// If the value fits in an int32, store an int32 type tag.
|
||||
// Else, convert the value to double and box it.
|
||||
|
|
|
@ -1109,11 +1109,19 @@ private:
|
|||
break;
|
||||
case Scalar::Int16:
|
||||
case Scalar::Uint16:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
store16Swapped(value, dest);
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
store16(value, dest);
|
||||
#endif
|
||||
break;
|
||||
case Scalar::Int32:
|
||||
case Scalar::Uint32:
|
||||
#if defined(JS_CODEGEN_PPC_OSX)
|
||||
store32ByteSwapped(value, dest);
|
||||
#elif defined(JS_CODEGEN_X86)
|
||||
store32(value, dest);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("Invalid typed array type");
|
||||
|
|
|
@ -126,7 +126,7 @@ IsAnyTypedArrayClass(const Class* clasp)
|
|||
class SharedOps
|
||||
{
|
||||
public:
|
||||
#if(0)
|
||||
#ifndef JS_CODEGEN_PPC_OSX
|
||||
template<typename T>
|
||||
static T load(SharedMem<T*> addr) {
|
||||
return js::jit::AtomicOperations::loadSafeWhenRacy(addr);
|
||||
|
@ -214,7 +214,7 @@ class SharedOps
|
|||
class UnsharedOps
|
||||
{
|
||||
public:
|
||||
#if(0)
|
||||
#ifndef JS_CODEGEN_PPC_OSX
|
||||
template<typename T>
|
||||
static T load(SharedMem<T*> addr) {
|
||||
return *addr.unwrapUnshared();
|
||||
|
|
|
@ -187,10 +187,11 @@ endif
|
|||
|
||||
ifeq ($(OS_TARGET),Darwin)
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
ASFILES = mpi_sse2.s
|
||||
# Disable SSE2 since it causes assembler and linker issues
|
||||
# ASFILES = mpi_sse2.s
|
||||
DEFINES += -DMP_USE_UINT_DIGIT
|
||||
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
||||
DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
|
||||
# DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
||||
# DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
|
||||
endif
|
||||
endif # Darwin
|
||||
|
||||
|
|
|
@ -188,13 +188,22 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
|
||||
[fileClerk removeFileAtPath: myWebRTPath handler:nil];
|
||||
#else
|
||||
[fileClerk removeItemAtPath: myWebRTPath error: &errorDesc];
|
||||
#endif
|
||||
if (errorDesc != nil) {
|
||||
NSLog(@"failed to unlink old binary file at path: %@ with error: %@", myWebRTPath, errorDesc);
|
||||
@throw MakeException(@"Unable To Update", @"Failed preparation for Web Runtime update");
|
||||
}
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
|
||||
[fileClerk copyPath: newWebRTPath toPath: myWebRTPath handler:nil];
|
||||
#else
|
||||
[fileClerk copyItemAtPath: newWebRTPath toPath: myWebRTPath error: &errorDesc];
|
||||
#endif
|
||||
|
||||
[fileClerk release];
|
||||
if (errorDesc != nil) {
|
||||
NSLog(@"failed to copy new webrt file: %@", errorDesc);
|
||||
|
|
Loading…
Reference in New Issue