[x265] [PATCH RFC] cpu-a: remove unused safe_intel_cpu_indicator_init routine
Steve Borho
steve at borho.org
Thu Oct 3 07:28:56 CEST 2013
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1380777142 18000
# Thu Oct 03 00:12:22 2013 -0500
# Node ID 835aeb9eed2c9098e46f0817f9fc65c4f4494242
# Parent 25366dc0fd1c06d3bb08cafcc2131fc1ffa76e1c
cpu-a: remove unused safe_intel_cpu_indicator_init routine
This was causing -fPIC link errors with icpc|gcc on Linux while linking a shared
library. With this change I can build libx265.so, but the size is mysterious:
629961 libx265.so
2477000 x265
The x265 executable requires libx265.so to be present to run, but the bulk of
the code seems to be in the executable itself.
diff -r 25366dc0fd1c -r 835aeb9eed2c source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Oct 02 22:54:42 2013 -0500
+++ b/source/common/x86/asm-primitives.cpp Thu Oct 03 00:12:22 2013 -0500
@@ -26,8 +26,6 @@
extern "C" {
#include "pixel.h"
-void x265_intel_cpu_indicator_init( void ) {}
-
#define LOWRES(cpu)\
void x265_frame_init_lowres_core_##cpu( pixel *src0, pixel *dst0, pixel *dsth, pixel *dstv, pixel *dstc,\
intptr_t src_stride, intptr_t dst_stride, int width, int height );
diff -r 25366dc0fd1c -r 835aeb9eed2c source/common/x86/cpu-a.asm
--- a/source/common/x86/cpu-a.asm Wed Oct 02 22:54:42 2013 -0500
+++ b/source/common/x86/cpu-a.asm Thu Oct 03 00:12:22 2013 -0500
@@ -145,53 +145,3 @@
cglobal cpu_sfence
sfence
ret
-
-cextern intel_cpu_indicator_init
-
-;-----------------------------------------------------------------------------
-; void safe_intel_cpu_indicator_init( void );
-;-----------------------------------------------------------------------------
-cglobal safe_intel_cpu_indicator_init
- push r0
- push r1
- push r2
- push r3
- push r4
- push r5
- push r6
-%if ARCH_X86_64
- push r7
- push r8
- push r9
- push r10
- push r11
- push r12
- push r13
- push r14
-%endif
- push rbp
- mov rbp, rsp
-%if WIN64
- sub rsp, 32 ; shadow space
-%endif
- and rsp, ~31
- call intel_cpu_indicator_init
- leave
-%if ARCH_X86_64
- pop r14
- pop r13
- pop r12
- pop r11
- pop r10
- pop r9
- pop r8
- pop r7
-%endif
- pop r6
- pop r5
- pop r4
- pop r3
- pop r2
- pop r1
- pop r0
- ret
More information about the x265-devel
mailing list