File likwid-3.1.3-loadData-for-i386.patch of Package likwid

diff -Nur likwid-3.1.3.orig/Makefile likwid-3.1.3/Makefile
--- likwid-3.1.3.orig/Makefile	2014-11-04 15:25:12.000000000 +0100
+++ likwid-3.1.3/Makefile	2015-02-11 12:46:29.591392577 +0100
@@ -152,7 +152,7 @@
 
 VPATH     = $(SRC_DIR)
 OBJ       = $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.c))
-OBJ      += $(patsubst $(SRC_DIR)/%.s, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.s))
+OBJ      += $(patsubst $(SRC_DIR)/%.S, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.S))
 OBJ      += $(patsubst $(SRC_DIR)/%.cc, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.cc))
 PERFMONHEADERS  = $(patsubst $(SRC_DIR)/includes/%.txt, $(BUILD_DIR)/%.h,$(wildcard $(SRC_DIR)/includes/*.txt))
 OBJ_BENCH  =  $(patsubst $(BENCH_DIR)/%.ptt, $(BUILD_DIR)/%.o,$(wildcard $(BENCH_DIR)/*.ptt))
@@ -238,9 +238,9 @@
 	$(Q)$(CC) -c  $(CFLAGS) $(ANSI_CFLAGS) $(CPPFLAGS) $< -o $@
 	$(Q)$(CC) $(CPPFLAGS) -MT $(@:.d=.o) -MM  $< > $(BUILD_DIR)/$*.d
 
-$(BUILD_DIR)/%.o:  %.s
+$(BUILD_DIR)/%.o:  %.S
 	@echo "===>  ASSEMBLE  $@"
-	$(Q)$(AS) $(ASFLAGS)  $< -o $@
+	$(Q)$(CC) -c  $< -o $@
 
 $(BUILD_DIR)/%.o:  %.cc
 	@echo "===>  COMPILE  $@"
diff -Nur likwid-3.1.3.orig/src/loadData.s likwid-3.1.3/src/loadData.s
--- likwid-3.1.3.orig/src/loadData.s	2014-10-15 15:02:12.000000000 +0200
+++ likwid-3.1.3/src/loadData.s	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-.intel_syntax noprefix
-
-.text
-.globl _loadData
-.type _loadData, @function
-_loadData :
-
-xor rax, rax
-.align 16
-1:
-mov  r8,  [rsi + rax]
-mov  r9,  [rsi + rax + 64]
-mov  r10, [rsi + rax + 128]
-mov r11,  [rsi + rax + 192]
-add rax, 256
-cmp rax, rdi
-jb 1b
-
-ret
-.size _loadData, .-_loadData
-
-
diff -Nur likwid-3.1.3.orig/src/loadData.S likwid-3.1.3/src/loadData.S
--- likwid-3.1.3.orig/src/loadData.S	1970-01-01 01:00:00.000000000 +0100
+++ likwid-3.1.3/src/loadData.S	2015-02-11 10:54:23.260597088 +0100
@@ -0,0 +1,44 @@
+.intel_syntax noprefix
+
+.text
+.globl _loadData
+.type _loadData, @function
+_loadData :
+#ifdef __x86_64
+xor rax, rax
+.align 16
+1:
+mov  r8,  [rsi + rax]
+mov  r9,  [rsi + rax + 64]
+mov  r10, [rsi + rax + 128]
+mov r11,  [rsi + rax + 192]
+add rax, 256
+cmp rax, rdi
+jb 1b
+
+ret
+#else
+#ifdef __i386__
+push	ebp
+mov	ebp, esp
+push edi
+push esi
+xor eax, eax
+1:
+mov edi, DWORD PTR [ebp + eax + 12]
+mov esi, DWORD PTR [ebp + eax + 76]
+mov ecx, DWORD PTR [ebp + eax + 140]
+mov edx, DWORD PTR [ebp + eax + 204]
+add eax, 256
+cmp eax, DWORD PTR [ebp + 8]
+jb 1b
+pop esi
+pop edi
+mov esp, ebp
+pop ebp
+ret
+#endif
+#endif
+.size _loadData, .-_loadData
+
+
openSUSE Build Service is sponsored by