diff options
Diffstat (limited to 'dev-util/callgrind/files/callgrind-sim-pic.patch')
-rw-r--r-- | dev-util/callgrind/files/callgrind-sim-pic.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-util/callgrind/files/callgrind-sim-pic.patch b/dev-util/callgrind/files/callgrind-sim-pic.patch new file mode 100644 index 000000000000..64b7d49235eb --- /dev/null +++ b/dev-util/callgrind/files/callgrind-sim-pic.patch @@ -0,0 +1,25 @@ +--- callgrind-0.9.10/src/sim.c.orig 2005-01-28 11:40:35.000000000 +0100 ++++ callgrind-0.9.10/src/sim.c 2005-01-28 11:50:00.000000000 +0100 +@@ -309,11 +309,22 @@ + + static __inline__ void cpuid(Int n, UInt *a, UInt *b, UInt *c, UInt *d) + { ++#ifdef __PIC__ ++ __asm__ __volatile__ ( ++ "pushl %%ebx\n\t"\ ++ "cpuid\n\t"\ ++ "movl %%ebx,%1\n\t"\ ++ "popl %%ebx" ++ : "=a" (*a), "=r" (*b), "=c" (*c), "=d" (*d) /* output */ ++ : "0" (n) /* input */ ++ ); ++#else + __asm__ __volatile__ ( + "cpuid" + : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) /* output */ + : "0" (n) /* input */ + ); ++#endif + } + + static void micro_ops_warn(Int actual_size, Int used_size, Int line_size) |