diff options
-rw-r--r-- | sysutils/x86info/Makefile | 4 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-bench_benchmarks.c | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sysutils/x86info/Makefile b/sysutils/x86info/Makefile index 7d2d33962f80..2480aa87bead 100644 --- a/sysutils/x86info/Makefile +++ b/sysutils/x86info/Makefile @@ -12,10 +12,10 @@ CATEGORIES= sysutils MASTER_SITES= http://www.codemonkey.org.uk/projects/x86info/ EXTRACT_SUFX= .tgz -MAINTAINER= erik@smluc.org +MAINTAINER= stas@FreeBSD.org COMMENT= Utility to display information about the systems x86 processor(s) -ONLY_FOR_ARCHS= i386 +ONLY_FOR_ARCHS= i386 amd64 PLIST_FILES= bin/x86info MAN1= x86info.1 MAKE_ARGS= CFLAGS="${CFLAGS}" diff --git a/sysutils/x86info/files/patch-bench_benchmarks.c b/sysutils/x86info/files/patch-bench_benchmarks.c new file mode 100644 index 000000000000..4627173af5b3 --- /dev/null +++ b/sysutils/x86info/files/patch-bench_benchmarks.c @@ -0,0 +1,16 @@ +--- bench/benchmarks.c.orig 2008-09-04 03:03:34.000000000 +0400 ++++ bench/benchmarks.c 2008-09-04 03:04:55.000000000 +0400 +@@ -21,8 +21,13 @@ + #endif + TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid"); + ++#ifdef __i386__ + TIME(asm volatile("addl $1,0(%esp)"), "addl"); + TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add"); ++#elif defined(__amd64__) ++ TIME(asm volatile("addl $1,0(%rsp)"), "addl"); ++ TIME(asm volatile("lock ; addl $1,0(%rsp)"), "locked add"); ++#endif + + TIME(asm volatile("bswap %0" : "=r" (tmp) : "0" (tmp)), "bswap"); + } |