regenerate generated code
authorDavid Schleef <ds@schleef.org>
Wed, 9 Jun 2010 23:19:09 +0000 (16:19 -0700)
committerDavid Schleef <ds@schleef.org>
Wed, 9 Jun 2010 23:19:49 +0000 (16:19 -0700)
orc/orcfunctions.c

index 9b292e0..0cec4ea 100644 (file)
@@ -1,14 +1,50 @@
 
 /* autogenerated from orcfunctions.orc */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #ifndef DISABLE_ORC
 #include <orc/orc.h>
 #else
+/* begin Orc C target preamble */
+#if defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L
 #include <stdint.h>
+typedef int8_t orc_int8;
+typedef int16_t orc_int16;
+typedef int32_t orc_int32;
+typedef int64_t orc_int64;
+typedef uint8_t orc_uint8;
+typedef uint16_t orc_uint16;
+typedef uint32_t orc_uint32;
+typedef uint64_t orc_uint64;
+#elif defined(_MSC_VER)
+typedef signed __int8 orc_int8;
+typedef signed __int16 orc_int16;
+typedef signed __int32 orc_int32;
+typedef signed __int64 orc_int64;
+typedef unsigned __int8 orc_uint8;
+typedef unsigned __int16 orc_uint16;
+typedef unsigned __int32 orc_uint32;
+typedef unsigned __int64 orc_uint64;
+#else
+#include <limits.h>
+typedef signed char orc_int8;
+typedef short orc_int16;
+typedef int orc_int32;
+typedef unsigned char orc_uint8;
+typedef unsigned short orc_uint16;
+typedef unsigned int orc_uint32;
+#if INT_MAX == LONG_MAX
+typedef long long orc_int64;
+typedef unsigned long long orc_uint64;
+#else
+typedef long orc_int64;
+typedef unsigned long orc_uint64;
 #endif
-
-
-/* begin Orc C target preamble */
+#endif
+typedef union { orc_int32 i; float f; } orc_union32;
+typedef union { orc_int64 i; double f; } orc_union64;
 #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
 #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
 #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
 #define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8))
 #define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24))
 #define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
-#define ORC_AS_FLOAT(x) (((union { int i; float f; } *)(&x))->f)
 /* end Orc C target preamble */
+#endif
+
+void orc_memcpy (void * d1, const void * s1, int n);
+void orc_memset (void * d1, int p1, int n);
 
 
 
 void
 orc_memcpy (void * d1, const void * s1, int n){
   int i;
-  int8_t var0;
-  int8_t * ptr0;
-  int8_t var4;
-  const int8_t * ptr4;
+  orc_int8 var0;
+  orc_int8 * ptr0;
+  orc_int8 var4;
+  const orc_int8 * ptr4;
 
-  ptr0 = d1;
-  ptr4 = s1;
+  ptr0 = (orc_int8 *)d1;
+  ptr4 = (orc_int8 *)s1;
 
   for (i = 0; i < n; i++) {
     var4 = *ptr4;
@@ -69,13 +108,13 @@ _backup_orc_memcpy (OrcExecutor *ex)
 {
   int i;
   int n = ex->n;
-  int8_t var0;
-  int8_t * ptr0;
-  int8_t var4;
-  const int8_t * ptr4;
+  orc_int8 var0;
+  orc_int8 * ptr0;
+  orc_int8 var4;
+  const orc_int8 * ptr4;
 
-  ptr0 = ex->arrays[0];
-  ptr4 = ex->arrays[4];
+  ptr0 = (orc_int8 *)ex->arrays[0];
+  ptr4 = (orc_int8 *)ex->arrays[4];
 
   for (i = 0; i < n; i++) {
     var4 = *ptr4;
@@ -131,11 +170,11 @@ orc_memcpy (void * d1, const void * s1, int n)
 void
 orc_memset (void * d1, int p1, int n){
   int i;
-  int8_t var0;
-  int8_t * ptr0;
-  const int8_t var24 = p1;
+  orc_int8 var0;
+  orc_int8 * ptr0;
+  const orc_int8 var24 = p1;
 
-  ptr0 = d1;
+  ptr0 = (orc_int8 *)d1;
 
   for (i = 0; i < n; i++) {
     /* 0: copyb */
@@ -152,11 +191,11 @@ _backup_orc_memset (OrcExecutor *ex)
 {
   int i;
   int n = ex->n;
-  int8_t var0;
-  int8_t * ptr0;
-  const int8_t var24 = ex->params[24];
+  orc_int8 var0;
+  orc_int8 * ptr0;
+  const orc_int8 var24 = ex->params[24];
 
-  ptr0 = ex->arrays[0];
+  ptr0 = (orc_int8 *)ex->arrays[0];
 
   for (i = 0; i < n; i++) {
     /* 0: copyb */