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