Skip to content

Commit

Permalink
games/ezquake: fix build on powerpc
Browse files Browse the repository at this point in the history
Same issue as on powerpc64.
  • Loading branch information
pkubaj committed Jun 19, 2021
1 parent 6cfbc4c commit 2ddeab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions games/ezquake/files/patch-host.c
Expand Up @@ -4,15 +4,15 @@
SYSINFO_processor_description = cpu_model;

gettimeofday(&old_tp, NULL);
+#ifdef __powerpc64__
+#ifdef __powerpc__
+ __asm__ __volatile__("mfspr %%r3, 268": "=r" (old_tsc));
+#else
old_tsc = rdtsc();
+#endif
do {
gettimeofday(&tp, NULL);
} while ((tp.tv_sec - old_tp.tv_sec) * 1000000. + tp.tv_usec - old_tp.tv_usec < 1000000.);
+#ifdef __powerpc64__
+#ifdef __powerpc__
+ __asm__ __volatile__("mfspr %%r3, 268": "=r" (tsc_freq));
+#else
tsc_freq = rdtsc();
Expand Down

0 comments on commit 2ddeab9

Please sign in to comment.