Displaying 6 results from an estimated 6 matches for "int_endianness".
2012 Jun 13
0
[LLVMdev] [Patch] compiler-rt lib/int_endianness.h
Attached is a patch to pull in the correct endian.h file on the BSD'. I
checked all OS' on the defined list and they all require machine
instead of sys. While there I added __Bitrig__ which is a newly
launched OS that uses clang as it's compiler.
diff --git a/lib/int_endianness.h b/lib/int_endianness.h
index 70bd177..f821f9a 100644
--- a/lib/int_endianness.h
+++ b/lib/int_endianness.h
@@ -31,8 +31,8 @@
/* .. */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__minix)
-#include <sys/endian.h>
+#if def...
2012 Jan 07
3
[LLVMdev] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...rtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) )
+ exit(1);
+}
+#else
#include <sys/mman.h>
-
-
-
extern void __clear_cache(void* start, void* end);
extern void __enable_execute_stack(void* addr);
+#endif
typedef int (*pfunc)(void);
Index: lib/int_endianness.h
===================================================================
--- lib/int_endianness.h (revision 147731)
+++ lib/int_endianness.h (working copy)
@@ -80,6 +80,11 @@
#endif /* GNU/Linux */
+#if defined(_WIN32)
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif /* Windo...
2012 Jan 05
0
[LLVMdev] [PATCH] [compiler-rt] Minix (w.r.t. svn r147606)
...-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonflyBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonflyBSD__) || defined(__minix)
#include <sys/endian.h>
#if _BYTE_ORDER == _BIG_ENDIAN
Index: lib/int_endianness.h
===================================================================
--- lib/int_endianness.h (revision 147606)
+++ lib/int_endianness.h (working copy)
@@ -31,7 +31,7 @@
/* .. */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(__...
2012 Jan 07
1
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...rtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) )
+ exit(1);
+}
+#else
#include <sys/mman.h>
-
-
-
extern void __clear_cache(void* start, void* end);
extern void __enable_execute_stack(void* addr);
+#endif
typedef int (*pfunc)(void);
Index: lib/int_endianness.h
===================================================================
--- lib/int_endianness.h (revision 147731)
+++ lib/int_endianness.h (working copy)
@@ -80,6 +80,13 @@
#endif /* GNU/Linux */
+#if defined(_WIN32)
+
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+
+#endif /* W...
2012 Jan 07
0
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
Hi Ruben,
> I see I missed some curly braces. I also modified spacing a tiny bit.
Doesn't seem so. E.g. you have:
+ if ( !VirtualQuery(addr, &b, sizeof(b)) )
+ exit(1);
+ if( !VirtualProtect(b.BaseAddress, b.RegionSize,
PAGE_EXECUTE_READWRITE, &b.Protect) )
Add space after "if". Do not put spaces after "(" and before ")". Same
for other
2012 Jan 07
2
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...nction with another
memcpy(execution_buffer, (void *)(uintptr_t)&func2, 128);
__clear_cache(execution_buffer, &execution_buffer[128]);
pfunc f2 = (pfunc)(uintptr_t)execution_buffer;
- if ( (*f2)() != 2 )
+ if ((*f2)() != 2)
return 1;
return 0;
Index: lib/int_endianness.h
===================================================================
--- lib/int_endianness.h (revision 147738)
+++ lib/int_endianness.h (working copy)
@@ -80,6 +80,13 @@
#endif /* GNU/Linux */
+#if defined(_WIN32)
+
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+
+#endif /* W...