aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2008-09-03 23:22:12 +0000
committerStanislav Sedov <stas@FreeBSD.org>2008-09-03 23:22:12 +0000
commit2b749601ae4b84112972a4a96fafdf7db6d28d55 (patch)
tree8c9fc163d7d21fbf5356574f1d3be7e2164e1a09 /sysutils
parent21dd0fcf2971bd0f0007bc954acee6c2a5d2f39a (diff)
downloadports-2b749601ae4b84112972a4a96fafdf7db6d28d55.tar.gz
ports-2b749601ae4b84112972a4a96fafdf7db6d28d55.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/x86info/Makefile4
-rw-r--r--sysutils/x86info/files/patch-bench_benchmarks.c16
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");
+ }