Issue #3007 - Remove IA64 runtime support paths
This commit is contained in:
1 parent
f499e3dd36
commit
2a06c40a09
10 files changed
+30
-69
No files matched your search
@@ -194,7 +194,7 @@ static void FreeStringArray(uint32_t variants, char ** array)
|
||||
|
||||
static bool CanLoadPlugin(char16ptr_t aBinaryPath)
|
||||
{
|
||||
#if defined(_M_IX86) || defined(_M_X64) || defined(_M_IA64)
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
bool canLoad = false;
|
||||
|
||||
HANDLE file = CreateFileW(aBinaryPath, GENERIC_READ,
|
||||
@@ -214,8 +214,6 @@ static bool CanLoadPlugin(char16ptr_t aBinaryPath)
|
||||
canLoad = (arch == IMAGE_FILE_MACHINE_I386);
|
||||
#elif defined(_M_X64)
|
||||
canLoad = (arch == IMAGE_FILE_MACHINE_AMD64);
|
||||
#elif defined(_M_IA64)
|
||||
canLoad = (arch == IMAGE_FILE_MACHINE_IA64);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -416,13 +416,13 @@ MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE,
|
||||
int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0)
|
||||
|
||||
// Solaris manages 64-bit address space in a different manner from every other
|
||||
// AMD64 operating system, but fortunately the fix is the same one
|
||||
// required for every operating system on 64-bit SPARC, Itanium, and ARM.
|
||||
// AMD64 operating system, but fortunately the fix is the same one
|
||||
// required for every operating system on 64-bit SPARC and ARM.
|
||||
// Most people's intuition failed them here and they thought this couldn't
|
||||
// possibly be correct on AMD64, but for Solaris/illumos it is.
|
||||
|
||||
{
|
||||
#if defined(__ia64__) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
|
||||
#if defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
|
||||
MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
|
||||
#endif
|
||||
void* region = mmap(desired, length, prot, flags, fd, offset);
|
||||
@@ -445,14 +445,14 @@ static inline void*
|
||||
MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE,
|
||||
int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0)
|
||||
{
|
||||
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
|
||||
#if defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__)
|
||||
/*
|
||||
* The JS engine assumes that all allocated pointers have their high 17 bits clear,
|
||||
* which ia64's mmap doesn't support directly. However, we can emulate it by passing
|
||||
* mmap an "addr" parameter with those bits clear. The mmap will return that address,
|
||||
* or the nearest available memory above that address, providing a near-guarantee
|
||||
* that those bits are clear. If they are not, we return nullptr below to indicate
|
||||
* out-of-memory.
|
||||
* which mmap on this platform doesn't support directly. However, we can emulate it
|
||||
* by passing mmap an "addr" parameter with those bits clear. The mmap will return
|
||||
* that address, or the nearest available memory above that address, providing a
|
||||
* near-guarantee that those bits are clear. If they are not, we return nullptr below
|
||||
* to indicate out-of-memory.
|
||||
*
|
||||
* The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
|
||||
* address space.
|
||||
@@ -479,7 +479,7 @@ MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE,
|
||||
* different due to the different mmap behavior.
|
||||
*
|
||||
* TODO: Merge with the above code block if this implementation works for
|
||||
* ia64 and sparc64.
|
||||
* sparc64.
|
||||
*/
|
||||
const uintptr_t start = UINT64_C(0x0000070000000000);
|
||||
const uintptr_t end = UINT64_C(0x0000800000000000);
|
||||
|
||||
@@ -301,7 +301,7 @@ void unmapPages(void* p, size_t size) { }
|
||||
void*
|
||||
mapMemoryAt(void* desired, size_t length)
|
||||
{
|
||||
#if defined(__ia64__) || defined(__aarch64__) || \
|
||||
#if defined(__aarch64__) || \
|
||||
(defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
|
||||
MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
|
||||
#endif
|
||||
@@ -324,7 +324,7 @@ mapMemory(size_t length)
|
||||
int fd = -1;
|
||||
off_t offset = 0;
|
||||
// The test code must be aligned with the implementation in gc/Memory.cpp.
|
||||
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
|
||||
#if defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__)
|
||||
void* region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
|
||||
if (region == MAP_FAILED)
|
||||
return nullptr;
|
||||
|
||||
@@ -896,7 +896,7 @@ static const bool config_recycle = false;
|
||||
* controlling the malloc behavior are defined as compile-time constants
|
||||
* for best performance and cannot be altered at runtime.
|
||||
*/
|
||||
#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
|
||||
#if !defined(__sparc__) && !defined(__mips__) && \
|
||||
!defined(__aarch64__) && !defined(__loongarch__) && !defined(__loongarch64)
|
||||
#define MALLOC_STATIC_SIZES 1
|
||||
#endif
|
||||
@@ -909,7 +909,7 @@ static const bool config_recycle = false;
|
||||
* Platform specific page size conditions copied from js/public/HeapAPI.h
|
||||
*/
|
||||
#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
|
||||
(defined(__sparc) || defined(__sparcv9) || defined(__ia64))
|
||||
(defined(__sparc) || defined(__sparcv9))
|
||||
#define pagesize_2pow ((size_t) 13)
|
||||
#elif defined(__powerpc64__)
|
||||
#define pagesize_2pow ((size_t) 16)
|
||||
@@ -1967,14 +1967,14 @@ static void *
|
||||
pages_map(void *addr, size_t size)
|
||||
{
|
||||
void *ret;
|
||||
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
#if (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
/*
|
||||
* The JS engine assumes that all allocated pointers have their high 17 bits clear,
|
||||
* which ia64's mmap doesn't support directly. However, we can emulate it by passing
|
||||
* mmap an "addr" parameter with those bits clear. The mmap will return that address,
|
||||
* or the nearest available memory above that address, providing a near-guarantee
|
||||
* that those bits are clear. If they are not, we return NULL below to indicate
|
||||
* out-of-memory.
|
||||
* which mmap on these platforms doesn't support directly. However, we can emulate
|
||||
* it by passing mmap an "addr" parameter with those bits clear. The mmap will
|
||||
* return that address, or the nearest available memory above that address,
|
||||
* providing a near-guarantee that those bits are clear. If they are not, we return
|
||||
* NULL below to indicate out-of-memory.
|
||||
*
|
||||
* The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
|
||||
* address space.
|
||||
@@ -2022,7 +2022,7 @@ pages_map(void *addr, size_t size)
|
||||
if (ret == MAP_FAILED) {
|
||||
ret = NULL;
|
||||
}
|
||||
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
#if (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
/*
|
||||
* If the allocated memory doesn't have its upper 17 bits clear, consider it
|
||||
* as out of memory.
|
||||
@@ -2055,7 +2055,7 @@ pages_map(void *addr, size_t size)
|
||||
MozTagAnonymousMemory(ret, size, "jemalloc");
|
||||
}
|
||||
|
||||
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
#if (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
|
||||
assert(ret == NULL || (!check_placement && ret != NULL)
|
||||
|| (check_placement && ret == addr));
|
||||
#else
|
||||
|
||||
+2
-4
@@ -124,15 +124,13 @@
|
||||
defined(_POWER) || defined(__hppa) || \
|
||||
defined(_MIPSEB) || defined(__ARMEB__) || \
|
||||
defined(__s390__) || defined(__AARCH64EB__) || \
|
||||
(defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
|
||||
(defined(__ia64) && defined(__BIG_ENDIAN__))
|
||||
(defined(__sh__) && defined(__LITTLE_ENDIAN__))
|
||||
# define MOZ_BIG_ENDIAN 1
|
||||
#elif defined(__i386) || defined(__i386__) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || \
|
||||
defined(_MIPSEL) || defined(__ARMEL__) || \
|
||||
defined(__alpha__) || defined(__AARCH64EL__) || \
|
||||
(defined(__sh__) && defined(__BIG_ENDIAN__)) || \
|
||||
(defined(__ia64) && !defined(__BIG_ENDIAN__))
|
||||
(defined(__sh__) && defined(__BIG_ENDIAN__))
|
||||
# define MOZ_LITTLE_ENDIAN 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -156,14 +156,6 @@
|
||||
#elif defined __aarch64__
|
||||
#define RETURN_INSTR 0xd65f03c0 /* ret */
|
||||
|
||||
#elif defined __ia64
|
||||
struct ia64_instr { uint32_t mI[4]; };
|
||||
static const ia64_instr _return_instr =
|
||||
{{ 0x00000011, 0x00000001, 0x80000200, 0x00840008 }}; /* br.ret.sptk.many b0 */
|
||||
|
||||
#define RETURN_INSTR _return_instr
|
||||
#define RETURN_INSTR_TYPE ia64_instr
|
||||
|
||||
#else
|
||||
#error "Need return instruction for this architecture"
|
||||
#endif
|
||||
@@ -393,16 +385,7 @@ ReserveNegativeControl()
|
||||
static void
|
||||
JumpTo(uintptr_t aOpaddr)
|
||||
{
|
||||
#ifdef __ia64
|
||||
struct func_call
|
||||
{
|
||||
uintptr_t mFunc;
|
||||
uintptr_t mGp;
|
||||
} call = { aOpaddr, };
|
||||
((void (*)())&call)();
|
||||
#else
|
||||
((void (*)())aOpaddr)();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -174,7 +174,7 @@ StackWalkInitCriticalAddress()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) // WIN32 x86 stack walking code
|
||||
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64)) // WIN32 x86 stack walking code
|
||||
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
@@ -311,19 +311,13 @@ WalkStackMain64(struct WalkStackData* aData)
|
||||
context = *static_cast<CONTEXT*>(aData->platformData);
|
||||
}
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_IA64)
|
||||
#if defined(_M_IX86)
|
||||
// Setup initial stack frame to walk from.
|
||||
STACKFRAME64 frame64;
|
||||
memset(&frame64, 0, sizeof(frame64));
|
||||
#ifdef _M_IX86
|
||||
frame64.AddrPC.Offset = context.Eip;
|
||||
frame64.AddrStack.Offset = context.Esp;
|
||||
frame64.AddrFrame.Offset = context.Ebp;
|
||||
#elif defined _M_IA64
|
||||
frame64.AddrPC.Offset = context.StIIP;
|
||||
frame64.AddrStack.Offset = context.SP;
|
||||
frame64.AddrFrame.Offset = context.RsBSP;
|
||||
#endif
|
||||
frame64.AddrPC.Mode = AddrModeFlat;
|
||||
frame64.AddrStack.Mode = AddrModeFlat;
|
||||
frame64.AddrFrame.Mode = AddrModeFlat;
|
||||
@@ -338,16 +332,12 @@ WalkStackMain64(struct WalkStackData* aData)
|
||||
DWORD64 addr;
|
||||
DWORD64 spaddr;
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_IA64)
|
||||
#if defined(_M_IX86)
|
||||
// 32-bit frame unwinding.
|
||||
// Debug routines are not threadsafe, so grab the lock.
|
||||
EnterCriticalSection(&gDbgHelpCS);
|
||||
BOOL ok = StackWalk64(
|
||||
#if defined _M_IA64
|
||||
IMAGE_FILE_MACHINE_IA64,
|
||||
#elif defined _M_IX86
|
||||
IMAGE_FILE_MACHINE_I386,
|
||||
#endif
|
||||
aData->process,
|
||||
aData->thread,
|
||||
&frame64,
|
||||
@@ -427,7 +417,7 @@ WalkStackMain64(struct WalkStackData* aData)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_IA64)
|
||||
#if defined(_M_IX86)
|
||||
if (frame64.AddrReturn.Offset == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -804,9 +804,7 @@ nsHttpHandler::InitUserAgentComponents()
|
||||
if (GetVersionEx(&info)) {
|
||||
#pragma warning(pop)
|
||||
const char *format;
|
||||
#if defined _M_IA64
|
||||
format = WNT_BASE W64_PREFIX "; IA64";
|
||||
#elif defined _M_X64 || defined _M_AMD64
|
||||
#if defined _M_X64 || defined _M_AMD64
|
||||
format = WNT_BASE W64_PREFIX "; x64";
|
||||
#else
|
||||
BOOL isWow64 = FALSE;
|
||||
|
||||
@@ -145,9 +145,6 @@ XPCOMUtils.defineLazyGetter(this, "gWinCPUArch", function aus_gWinCPUArch() {
|
||||
case 9:
|
||||
arch = "x64";
|
||||
break;
|
||||
case 6:
|
||||
arch = "IA64";
|
||||
break;
|
||||
case 0:
|
||||
arch = "x86";
|
||||
break;
|
||||
|
||||
@@ -161,9 +161,6 @@ XPCOMUtils.defineLazyGetter(this, "gOSVersion", function aus_gOSVersion() {
|
||||
case 9:
|
||||
arch = "x64";
|
||||
break;
|
||||
case 6:
|
||||
arch = "IA64";
|
||||
break;
|
||||
case 0:
|
||||
arch = "x86";
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user