A few fixes for 32-bit compiles
authorJens Axboe <jaxboe@fusionio.com>
Thu, 21 Oct 2010 06:15:59 +0000 (08:15 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 21 Oct 2010 06:15:59 +0000 (08:15 +0200)
- Change the HAVE_SSE to HAVE_SSE4_2 and only provide it on
  x86-64.
- Cast two values that otherwise cause the compiler to warn on 32-bit

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
arch/arch-x86.h
arch/arch-x86_64.h
crc/crc32c-intel.c
crc/crc32c.h
engines/binject.c
verify.c

index bffd1dd8b132ce68b6af4fc744a53669157a9332..2e803cbe5ba13c96e2f377516dca6def34bc013f 100644 (file)
@@ -48,7 +48,6 @@ static inline unsigned long long get_cpu_clock(void)
 }
 
 #define ARCH_HAVE_FFZ
-#define ARCH_HAVE_SSE
 #define ARCH_HAVE_CPU_CLOCK
 
 #endif
index 3ea8070ee619b9bf22476da4d54e792d8bf4c269..6dbeee06a6ed2999de25909287b6431828b30107 100644 (file)
@@ -48,7 +48,7 @@ static inline unsigned long long get_cpu_clock(void)
 }
 
 #define ARCH_HAVE_FFZ
-#define ARCH_HAVE_SSE
+#define ARCH_HAVE_SSE4_2
 #define ARCH_HAVE_CPU_CLOCK
 
 #endif
index 77d6df411973510298342d79e190db4b3a447ffa..969a037f942d24e9509b11217fd3123e01658aea 100644 (file)
@@ -18,7 +18,7 @@
  * Volume 2A: Instruction Set Reference, A-M
  */
 
-#ifdef ARCH_HAVE_SSE
+#ifdef ARCH_HAVE_SSE4_2
 
 #if BITS_PER_LONG == 64
 #define REX_PRE "0x48, "
index 50f3665f39375ddc4a8c4d6c7888930a13dcdda6..596fd6c56a98f835933ee68c17b1e845e0309a7d 100644 (file)
@@ -22,7 +22,7 @@
 
 extern uint32_t crc32c(unsigned char const *, unsigned long);
 
-#ifdef ARCH_HAVE_SSE
+#ifdef ARCH_HAVE_SSE4_2
 extern uint32_t crc32c_intel(unsigned char const *, unsigned long);
 extern int crc32c_intel_works(void);
 #else
index 0bdaa2402053ee64637adbe2a875290ab4b4397a..f7e56eb2ed0207bc7169a3259e4c2edb758fad5b 100644 (file)
@@ -146,7 +146,7 @@ static int fio_binject_getevents(struct thread_data *td, unsigned int min,
                for (i = 0; i < events; i++) {
                        struct b_user_cmd *buc = (struct b_user_cmd *) buf + i;
 
-                       bd->events[ev_index] = (struct io_u *) buc->usr_ptr;
+                       bd->events[ev_index] = (struct io_u *) (unsigned long) buc->usr_ptr;
                        ev_index++;
                }
        }
index f537553af92acf7e830b878d9ffd5e9173e04c35..ea1a911555558f503d706f100989f5b0da848439 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -501,7 +501,7 @@ static int verify_trimmed_io_u(struct thread_data *td, struct io_u *io_u)
        log_err("trim: verify failed at file %s offset %llu, length %lu"
                ", block offset %lu\n",
                        io_u->file->file_name, io_u->offset, io_u->buflen,
-                       (p - io_u->buf));
+                       (unsigned long) (p - io_u->buf));
        return ret;
 }