added read_cpuid and MTRR support checking before trying to set them
[retrobench] / tools / lutgen.c
index b4f2645..65a349f 100644 (file)
@@ -6,11 +6,13 @@ int main(void)
        int i;
 
        puts("\t.data");
+       puts("\t.globl _sinlut");
        puts("\t.globl sinlut");
+       puts("_sinlut:");
        puts("sinlut:");
-       for(i=0; i<256; i++) {
-               float x = sin((float)i / 128.0f * M_PI);
-               printf("\t.long %d\n", (int)(x * 256.0f));
+       for(i=0; i<2048; i++) {
+               float x = sin((float)i / 1024.0f * M_PI);
+               printf("\t.word %d\n", (short)(x * 32767.0f));
        }
        return 0;
 }