ref: 9a2d165892702dd73e5d1d54d45762e6da1c79c5
parent: 4cd2f82d2ad9425d213cd93f076f467a3fcfb001
author: Janne Grunau <janne-vlc@jannau.net>
date: Thu Jul 9 20:26:21 EDT 2020
x86inc.asm: remove private_prefix define and config.asm include Makes using unmodified upstream x86inc.asm possible.
--- a/meson.build
+++ b/meson.build
@@ -351,6 +351,7 @@
cdata.set10('ARCH_X86_32', host_machine.cpu_family() == 'x86')
if host_machine.cpu_family().startswith('x86')
+ cdata_asm.set('private_prefix', 'dav1d')
cdata_asm.set10('ARCH_X86_64', host_machine.cpu_family() == 'x86_64')
cdata_asm.set10('ARCH_X86_32', host_machine.cpu_family() == 'x86')
cdata_asm.set10('PIC', true)
--- a/src/ext/x86/x86inc.asm
+++ b/src/ext/x86/x86inc.asm
@@ -27,10 +27,8 @@
; It also has various other useful features to simplify writing the kind of
; DSP functions that are most often used.
-%include "config.asm"
-
%ifndef private_prefix
- %define private_prefix dav1d
+ %error private_prefix not defined
%endif
%ifndef public_prefix
--- a/src/x86/cdef_avx2.asm
+++ b/src/x86/cdef_avx2.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/cdef_avx512.asm
+++ b/src/x86/cdef_avx512.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if HAVE_AVX512ICL && ARCH_X86_64
--- a/src/x86/cdef_sse.asm
+++ b/src/x86/cdef_sse.asm
@@ -24,6 +24,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA 16
--- a/src/x86/cpuid.asm
+++ b/src/x86/cpuid.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION .text
--- a/src/x86/film_grain.asm
+++ b/src/x86/film_grain.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/film_grain_ssse3.asm
+++ b/src/x86/film_grain_ssse3.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA
--- a/src/x86/ipred.asm
+++ b/src/x86/ipred.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/ipred_ssse3.asm
+++ b/src/x86/ipred_ssse3.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA 16
--- a/src/x86/itx.asm
+++ b/src/x86/itx.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/itx_ssse3.asm
+++ b/src/x86/itx_ssse3.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
--- a/src/x86/loopfilter.asm
+++ b/src/x86/loopfilter.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/looprestoration.asm
+++ b/src/x86/looprestoration.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/looprestoration_ssse3.asm
+++ b/src/x86/looprestoration_ssse3.asm
@@ -24,6 +24,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA 16
--- a/src/x86/mc_avx2.asm
+++ b/src/x86/mc_avx2.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
--- a/src/x86/mc_avx512.asm
+++ b/src/x86/mc_avx512.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
%if HAVE_AVX512ICL && ARCH_X86_64
--- a/src/x86/mc_sse.asm
+++ b/src/x86/mc_sse.asm
@@ -24,6 +24,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA 16
--- a/src/x86/msac.asm
+++ b/src/x86/msac.asm
@@ -23,6 +23,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA 64 ; avoids cacheline splits
--- a/tests/checkasm/x86/checkasm.asm
+++ b/tests/checkasm/x86/checkasm.asm
@@ -23,8 +23,9 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-%define private_prefix checkasm
%include "config.asm"
+%undef private_prefix
+%define private_prefix checkasm
%include "ext/x86/x86inc.asm"
SECTION_RODATA 16