~ubuntu-branches/ubuntu/lucid/mupen64plus/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/interpreter_x86_fldcw.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sven Eckelmann
  • Date: 2009-09-28 15:23:17 UTC
  • Revision ID: james.westby@ubuntu.com-20090928152317-84y17o8hlh7batmw
Tags: 1.5+dfsg1-5
* debian/patches:
  - Change to dep3 patch tagging guidelines
  - Remove number before patches as order is given by debian/patches/series
  - Add gtk-open-filter.patch, Show files with .n64 and .v64 extension in
    filtered open file dialog (Closes: #546046)
  - Add noexecstack.patch, Don't enable executable stack by default
    (Closes: #547644)
  - Add fix_readpng.patch, Fix crash when loading png due to reordering
    optimizer
  - Add jttl_fix_romclosed.patch, Stop audio processing thread before freeing
    buffers to fix segfault during stop of emulation
  - Add rice_nodebug.patch, Don't enable excessive debug functionality in
    rice_video
  - Add interpreter_x86_fldcw.patch, Correctly set floating point control word
  - Add load-fpr-location.patch, Set register bank location when loading
    savestate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Correctly set floating point control word
 
2
 In interpreter mode small assembler snippeds are used to set the floating point
 
3
 control word to emulate the MIPS coprocessor behaviour. The makefile variable
 
4
 isn't propagated to the c preprocessor and thus we need to check otherwise if
 
5
 target architecture is x86 or compatible.
 
6
Bug: http://code.google.com/p/mupen64plus/issues/detail?id=272
 
7
Author: Sven Eckelmann <sven.eckelmann@gmx.de>
 
8
 
 
9
---
 
10
diff --git a/r4300/macros.h b/r4300/macros.h
 
11
index 1afcacaf129d339cf980e1f86811f5543ec4c7d7..18fe545de4ba05c36e900e603a81b288e421e382 100644
 
12
--- a/r4300/macros.h
 
13
+++ b/r4300/macros.h
 
14
@@ -98,7 +98,7 @@ stop=1; \
 
15
 #define TagHi reg_cop0[29]
 
16
 #define ErrorEPC reg_cop0[30]
 
17
 
 
18
-#ifdef X86
 
19
+#if (defined(__i386__) || defined(__x86_64__))
 
20
 #define set_rounding() __asm__ __volatile__("fldcw %0" : : "m" (rounding_mode))
 
21
 #define set_trunc() __asm__ __volatile__("fldcw %0" : : "m" (trunc_mode))
 
22
 #define set_round() __asm__ __volatile__("fldcw %0" : : "m" (round_mode))