Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/ruby-prof/files: ruby-prof-0.7.1-fix-amd64.patch
Date: Mon, 01 Dec 2008 09:10:24
Message-Id: E1L74nO-0004or-KJ@stork.gentoo.org
1 flameeyes 08/12/01 09:10:22
2
3 Added: ruby-prof-0.7.1-fix-amd64.patch
4 Log:
5 Version bump, with patch to work on x86-64.
6 (Portage version: 2.2_rc16/cvs/Linux 2.6.27-gentoo-r4 x86_64)
7
8 Revision Changes Path
9 1.1 dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/ruby-prof/files/ruby-prof-0.7.1-fix-amd64.patch?rev=1.1&content-type=text/plain
13
14 Index: ruby-prof-0.7.1-fix-amd64.patch
15 ===================================================================
16 Index: ruby-prof-0.7.1/ext/measure_cpu_time.h
17 ===================================================================
18 --- ruby-prof-0.7.1.orig/ext/measure_cpu_time.h
19 +++ ruby-prof-0.7.1/ext/measure_cpu_time.h
20 @@ -33,13 +33,16 @@ static unsigned long long cpu_frequency;
21
22 #if defined(__GNUC__)
23
24 +#include <stdint.h>
25 +
26 static prof_measure_t
27 measure_cpu_time()
28 {
29 #if defined(__i386__) || defined(__x86_64__)
30 - unsigned long long x;
31 - __asm__ __volatile__ ("rdtsc" : "=A" (x));
32 - return x;
33 + uint32_t a, d;
34 + __asm__ volatile("rdtsc\n\t"
35 + : "=a" (a), "=d" (d));
36 + return ((uint64_t)d << 32) + a;
37 #elif defined(__powerpc__) || defined(__ppc__)
38 unsigned long long x, y;