i965: Remove hand-rolled memcpy implementation.
authorMatt Turner <mattst88@gmail.com>
Sat, 21 Feb 2015 04:28:52 +0000 (20:28 -0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 2 Mar 2015 18:38:49 +0000 (10:38 -0800)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c

index c89e90ec3ad899f0e697cfac7a7c0307c25611e0..682fbe97db0609dd05eca10f88be230d0502640e 100644 (file)
@@ -1914,33 +1914,6 @@ gen6_upload_push_constants(struct brw_context *brw,
                            struct brw_stage_state *stage_state,
                            enum aub_state_struct_type type);
 
-/* ================================================================
- * From linux kernel i386 header files, copes with odd sizes better
- * than COPY_DWORDS would:
- * XXX Put this in src/mesa/main/imports.h ???
- */
-#if defined(i386) || defined(__i386__)
-static inline void * __memcpy(void * to, const void * from, size_t n)
-{
-   int d0, d1, d2;
-   __asm__ __volatile__(
-      "rep ; movsl\n\t"
-      "testb $2,%b4\n\t"
-      "je 1f\n\t"
-      "movsw\n"
-      "1:\ttestb $1,%b4\n\t"
-      "je 2f\n\t"
-      "movsb\n"
-      "2:"
-      : "=&c" (d0), "=&D" (d1), "=&S" (d2)
-      :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
-      : "memory");
-   return (to);
-}
-#else
-#define __memcpy(a,b,c) memcpy(a,b,c)
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index 7b96005ae0595212887ca9ea8150d6bbac8bd7cd..45c74936fcd2bab57a102ccf0e81146583fea4ad 100644 (file)
@@ -390,7 +390,7 @@ intel_batchbuffer_data(struct brw_context *brw,
 {
    assert((bytes & 3) == 0);
    intel_batchbuffer_require_space(brw, bytes, ring);
-   __memcpy(brw->batch.map + brw->batch.used, data, bytes);
+   memcpy(brw->batch.map + brw->batch.used, data, bytes);
    brw->batch.used += bytes >> 2;
 }