Changeset 50661ab in mainline for kernel/test/fpu/fpu1.c


Ignore:
Timestamp:
2006-12-11T19:00:04Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f272cb8
Parents:
319e60e
Message:

integrate more tests

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/test/fpu/fpu1.c

    r319e60e r50661ab  
    3939#include <arch/arch.h>
    4040
     41#ifdef CONFIG_BENCH
     42#include <arch/cycle.h>
     43#endif
     44
     45#if (defined(ia32) || defined(amd64) || defined(ia64) || defined(ia32xen))
     46
    4147#define THREADS         150*2
    4248#define ATTEMPTS        100
     
    149155}
    150156
    151 void test(void)
    152 {
     157void test_fpu1(void)
     158{
     159#ifdef CONFIG_BENCH
     160        uint64_t t0 = get_cycle();
     161#endif
    153162        thread_t *t;
    154163        int i;
     
    176185               
    177186        printf("Test passed.\n");
    178 }
     187#ifdef CONFIG_BENCH
     188        uint64_t dt = get_cycle() - t0;
     189        printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt);
     190#endif
     191}
     192
     193#else
     194
     195void test_fpu1(void)
     196{
     197        printf("This test is available only on Intel/AMD platforms.");
     198}
     199
     200#endif
Note: See TracChangeset for help on using the changeset viewer.