Treat tabs as having eight spaces instead of four
[akaros.git] / tests / xmm.c
index ccd1ba9..27d917d 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2014 The Regents of the University of California
- * Kevin KLues <klueska@cs.berkeley.edu>
+ * Kevin Klues <klueska@cs.berkeley.edu>
  * See LICENSE for details.
  *
  * xmm_test: test the reading/writing of the xmm registers */
@@ -8,14 +8,14 @@
 #include <pthread.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <benchutil/pvcalarm.h>
+#include <parlib/pvcalarm.h>
 
 static void nothing() {}
 
 static void read_xmm(int id)
 {
        char array[16*16] __attribute__((aligned(128))) = {0};
-    asm volatile (
+       asm volatile (
                "movdqa %%xmm0,  %0;"
                "movdqa %%xmm1,  %1;"
                "movdqa %%xmm2,  %2;"
@@ -49,12 +49,13 @@ static void read_xmm(int id)
                 "=m"(array[14*16]), 
                 "=m"(array[15*16])
                :
-        :
-    );
+               :
+       );
        for (int i=0; i<16; i++) {
                int *addr = (int*)(array + i*16);
                if (*addr != id) {
-                       printf("ERROR: xmm%d, id: %d, *addr: %d\n", i, id, *addr);
+                       printf("ERROR: xmm%d, id: %d, *addr: %d\n",
+                              i, id, *addr);
                        abort();
                }
        }
@@ -63,6 +64,7 @@ static void read_xmm(int id)
 static void write_xmm(int __id)
 {
        char id[16] __attribute__((aligned(128)));
+
        *((int*)id) = __id;
        asm volatile (
                "movdqa %0, %%xmm0;"
@@ -83,7 +85,7 @@ static void write_xmm(int __id)
                "movdqa %0, %%xmm15;"
                :
                :"m"(id[0])
-           :"%xmm0","%xmm1","%xmm2","%xmm3",
+                :"%xmm0","%xmm1","%xmm2","%xmm3",
                 "%xmm4","%xmm5","%xmm6","%xmm7",
                 "%xmm8","%xmm9","%xmm10","%xmm11",
                 "%xmm12","%xmm13","%xmm14","%xmm15"
@@ -105,7 +107,8 @@ int main(int argc, char** argv)
 
        enable_pvcalarms(PVCALARM_REAL, 10000, nothing);
        for (int i=0; i<NUM_THREADS; i++)
-               pthread_create(&children[i], NULL, &worker_thread, (void*)(long)i+2);
+               pthread_create(&children[i], NULL, &worker_thread,
+                              (void*)(long)i + 2);
        worker_thread((void*)(long)1);
        return 0;
 }