[mupen64plus-video-rice] 121/191: Imported Upstream version 1.99.5+4+90656ad47d82

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-rice.

commit d332f5092a8e494be1c6f64e3d803a8c97744f4a
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sat Jun 16 22:17:36 2012 +0200

    Imported Upstream version 1.99.5+4+90656ad47d82
---
 projects/unix/Makefile |  7 +++++++
 src/FrameBuffer.cpp    | 46 +++++++++++++++++++++++-----------------------
 2 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index 1d3ee89..43f2465 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -43,6 +43,7 @@ ifeq ("$(UNAME)","Darwin")
   OS = OSX
   SO_EXTENSION = dylib
   SHARED = -bundle
+  PIC = 1  # force PIC under OSX
 endif
 ifeq ("$(UNAME)","FreeBSD")
   OS = FREEBSD
@@ -332,6 +333,7 @@ targets:
 	@echo "    DESTDIR=path  == path to prepend to all installation paths (only for packagers)"
 	@echo "  Debugging Options:"
 	@echo "    DEBUG=1       == add debugging symbols"
+	@echo "    LTO=1         == enable experimental build with link-time optimization"
 	@echo "    V=1           == show verbose compiler output"
 
 all: $(TARGET)
@@ -356,6 +358,11 @@ CFLAGS += -MD
 -include $(OBJECTS:.o=.d)
 
 CXXFLAGS += $(CFLAGS)
+ifeq ($(LTO), 1)
+  CFLAGS += -flto
+  CXXFLAGS += -flto
+  LDFLAGS += -fuse-linker-plugin $(CXXFLAGS)
+endif
 
 # standard build rules
 $(OBJDIR)/%.o: $(SRCDIR)/%.c
diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp
index f6c712f..ee61b2e 100644
--- a/src/FrameBuffer.cpp
+++ b/src/FrameBuffer.cpp
@@ -667,30 +667,30 @@ l1:             mov esi, [ecx+ebx]
                      );
 #elif !defined(NO_ASM)
 # if !defined(__PIC__)
-           asm volatile("pusha                             \n"
-                "mov    pAsmStart, %%ecx           \n"  // = pStart
-                "mov    $0, %%edx                  \n"          // The CRC
-                "mov    dwAsmHeight, %%eax         \n"  // = y
-                "0:                                \n" //l2:
-                "mov    dwAsmdwBytesPerLine, %%ebx \n"  // = x
-                "sub    $4, %%ebx                  \n"
-                "1:                                \n" //l1:
-                "mov    (%%ecx,%%ebx), %%esi       \n"
-                "xor %%ebx, %%esi                  \n"
-                "rol $4, %%edx                     \n"
-                "add %%esi, %%edx                  \n"
-                "sub    $4, %%ebx                  \n"
-                "jge 1b                            \n" //jge l1
-                "xor %%eax, %%esi                  \n"
-                "add %%esi, %%edx                  \n"
-                "add dwAsmPitch, %%ecx             \n"
-                "dec %%eax                         \n"
-                "jge 0b                            \n" //jge l2
+           asm volatile("pusha                        \n"
+                "mov    %[pAsmStart], %%ecx           \n"  // = pStart
+                "mov    $0, %%edx                     \n"          // The CRC
+                "mov    %[dwAsmHeight], %%eax         \n"  // = y
+                "0:                                   \n" //l2:
+                "mov    %[dwAsmdwBytesPerLine], %%ebx \n"  // = x
+                "sub    $4, %%ebx                     \n"
+                "1:                                   \n" //l1:
+                "mov    (%%ecx,%%ebx), %%esi          \n"
+                "xor %%ebx, %%esi                     \n"
+                "rol $4, %%edx                        \n"
+                "add %%esi, %%edx                     \n"
+                "sub    $4, %%ebx                     \n"
+                "jge 1b                               \n" //jge l1
+                "xor %%eax, %%esi                     \n"
+                "add %%esi, %%edx                     \n"
+                "add %[dwAsmPitch], %%ecx             \n"
+                "dec %%eax                            \n"
+                "jge 0b                               \n" //jge l2
                 
-                "mov    %%edx, dwAsmCRC            \n"
-                "popa                              \n"
-                :
-                :
+                "mov    %%edx, %[dwAsmCRC]            \n"
+                "popa                                 \n"
+                : [pAsmStart]"+m"(pAsmStart), [dwAsmHeight]"+m"(dwAsmHeight), [dwAsmCRC]"=m"(dwAsmCRC)
+                : [dwAsmdwBytesPerLine]"m"(dwAsmdwBytesPerLine), [dwAsmPitch]"m"(dwAsmPitch)
                 : "memory", "cc"
                 );
 # else // defined(__PIC__)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-rice.git



More information about the Pkg-games-commits mailing list