Author: dreimer
Date: Mon Jun 15 11:40:33 2015
New Revision: 68145
URL:
http://svn.reactos.org/svn/reactos?rev=68145&view=rev
Log:
[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.
Modified:
trunk/reactos/dll/win32/dbghelp/compat.h
trunk/reactos/lib/sdk/crt/crt.cmake
trunk/reactos/lib/sdk/crt/libcntpr.cmake
trunk/reactos/lib/sdk/crt/math/sqrt.c
trunk/reactos/tools/rsym/CMakeLists.txt
Modified: trunk/reactos/dll/win32/dbghelp/compat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/compat.h…
==============================================================================
--- trunk/reactos/dll/win32/dbghelp/compat.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/compat.h [iso-8859-1] Mon Jun 15 11:40:33 2015
@@ -256,7 +256,108 @@
DWORD SegSs;
BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
} 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
+
typedef
EXCEPTION_DISPOSITION
NTAPI
Modified: trunk/reactos/lib/sdk/crt/crt.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
==============================================================================
--- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Mon Jun 15 11:40:33 2015
@@ -505,7 +505,6 @@
math/arm/log.s
math/arm/log10.s
math/arm/pow.s
- math/arm/sqrt.s
math/arm/tan.s
math/arm/_logb.s
math/arm/__dtoi64.s
@@ -546,6 +545,7 @@
math/modff.c
math/sin.c
math/sinhf.c
+ math/sqrt.c
math/sqrtf.c
math/tanf.c
math/tanhf.c
Modified: trunk/reactos/lib/sdk/crt/libcntpr.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.cmake…
==============================================================================
--- trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] Mon Jun 15 11:40:33 2015
@@ -210,6 +210,7 @@
list(APPEND LIBCNTPR_SOURCE
math/cos.c
math/sin.c
+ math/sqrt.c
mem/memchr.c
mem/memcpy.c
mem/memmove.c
Modified: trunk/reactos/lib/sdk/crt/math/sqrt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/sqrt.c?re…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/sqrt.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/sqrt.c [iso-8859-1] Mon Jun 15 11:40:33 2015
@@ -58,13 +58,13 @@
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
a memory location before comparison */
-#if DBG
- {
- volatile double y1 = y, y2;
- y2 = (y + (x / y)) * 0.5;
- assert(y1 == y2);
- }
-#endif
+//#if DBG
+// {
+// volatile double y1 = y, y2;
+// y2 = (y + (x / y)) * 0.5;
+// assert(y1 == y2);
+// }
+//#endif
return y;
}
Modified: trunk/reactos/tools/rsym/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] Mon Jun 15 11:40:33 2015
@@ -7,6 +7,8 @@
add_executable(rsym rsym.c)
elseif(ARCH STREQUAL "amd64")
add_executable(rsym rsym64.c)
+elseif(ARCH STREQUAL "arm")
+ add_executable(rsym rsym64.c)
endif()
target_link_libraries(rsym rsym_common dbghelphost zlibhost unicode)