[ARM arch]

PATCH: Get configure and host-tools building on arm again by Steven Edwards from dev-ml
+ adding Timo's portable sqrt variant to where it's needed to fix win32k build.
+ disabled the assert in sqrt.c for now.

svn path=/trunk/; revision=68145
This commit is contained in:
Daniel Reimer 2015-06-15 11:40:33 +00:00
parent 1b5231d4ed
commit da7e2c1c32
5 changed files with 112 additions and 8 deletions

View file

@ -256,7 +256,108 @@ typedef struct _CONTEXT {
DWORD SegSs; DWORD SegSs;
BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
} CONTEXT, *PCONTEXT; } CONTEXT, *PCONTEXT;
#else /* ARM? */
/* The following flags control the contents of the CONTEXT structure. */
#define CONTEXT_ARM 0x0200000
#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001)
#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002)
#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004)
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008)
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
typedef struct _RUNTIME_FUNCTION
{
DWORD BeginAddress;
union {
DWORD UnwindData;
struct {
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD Ret : 2;
DWORD H : 1;
DWORD Reg : 3;
DWORD R : 1;
DWORD L : 1;
DWORD C : 1;
DWORD StackAdjust : 10;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY
{
DWORD ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE
{
DWORD Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
DWORD LowAddress;
DWORD HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
typedef struct _CONTEXT {
/* The flags values within this flag control the contents of
a CONTEXT record.
If the context record is used as an input parameter, then
for each portion of the context record controlled by a flag
whose value is set, it is assumed that that portion of the
context record contains valid context. If the context record
is being used to modify a thread's context, then only that
portion of the threads context will be modified.
If the context record is used as an IN OUT parameter to capture
the context of a thread, then only those portions of the thread's
context corresponding to set flags will be returned.
The context record is never used as an OUT only parameter. */
ULONG ContextFlags;
/* This section is specified/returned if the ContextFlags word contains
the flag CONTEXT_INTEGER. */
ULONG R0;
ULONG R1;
ULONG R2;
ULONG R3;
ULONG R4;
ULONG R5;
ULONG R6;
ULONG R7;
ULONG R8;
ULONG R9;
ULONG R10;
ULONG Fp;
ULONG Ip;
/* These are selected by CONTEXT_CONTROL */
ULONG Sp;
ULONG Lr;
ULONG Pc;
ULONG Cpsr;
} CONTEXT;
BOOLEAN CDECL RtlAddFunctionTable(RUNTIME_FUNCTION*,DWORD,DWORD);
BOOLEAN CDECL RtlDeleteFunctionTable(RUNTIME_FUNCTION*);
PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry(ULONG_PTR,DWORD*,UNWIND_HISTORY_TABLE*);
#endif #endif
typedef typedef
EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
NTAPI NTAPI

View file

@ -505,7 +505,6 @@ elseif(ARCH STREQUAL "arm")
math/arm/log.s math/arm/log.s
math/arm/log10.s math/arm/log10.s
math/arm/pow.s math/arm/pow.s
math/arm/sqrt.s
math/arm/tan.s math/arm/tan.s
math/arm/_logb.s math/arm/_logb.s
math/arm/__dtoi64.s math/arm/__dtoi64.s
@ -546,6 +545,7 @@ if(NOT ARCH STREQUAL "i386")
math/modff.c math/modff.c
math/sin.c math/sin.c
math/sinhf.c math/sinhf.c
math/sqrt.c
math/sqrtf.c math/sqrtf.c
math/tanf.c math/tanf.c
math/tanhf.c math/tanhf.c

View file

@ -210,6 +210,7 @@ else()
list(APPEND LIBCNTPR_SOURCE list(APPEND LIBCNTPR_SOURCE
math/cos.c math/cos.c
math/sin.c math/sin.c
math/sqrt.c
mem/memchr.c mem/memchr.c
mem/memcpy.c mem/memcpy.c
mem/memmove.c mem/memmove.c

View file

@ -58,13 +58,13 @@ sqrt(
64 bit value, our GCC ignores this and uses an 80 bit FPU register 64 bit value, our GCC ignores this and uses an 80 bit FPU register
in an intermediate value, so we need to make sure it is stored in in an intermediate value, so we need to make sure it is stored in
a memory location before comparison */ a memory location before comparison */
#if DBG //#if DBG
{ // {
volatile double y1 = y, y2; // volatile double y1 = y, y2;
y2 = (y + (x / y)) * 0.5; // y2 = (y + (x / y)) * 0.5;
assert(y1 == y2); // assert(y1 == y2);
} // }
#endif //#endif
return y; return y;
} }

View file

@ -7,6 +7,8 @@ if(ARCH STREQUAL "i386")
add_executable(rsym rsym.c) add_executable(rsym rsym.c)
elseif(ARCH STREQUAL "amd64") elseif(ARCH STREQUAL "amd64")
add_executable(rsym rsym64.c) add_executable(rsym rsym64.c)
elseif(ARCH STREQUAL "arm")
add_executable(rsym rsym64.c)
endif() endif()
target_link_libraries(rsym rsym_common dbghelphost zlibhost unicode) target_link_libraries(rsym rsym_common dbghelphost zlibhost unicode)