From 56fb2374724b4bc0c2010af22b543edb866f6216 Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 3 May 2011 06:32:41 +0000 Subject: [PATCH] YASM support git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@606 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 2 ++ acinclude.m4 | 2 +- simd/jcclrmmx.asm | 2 -- simd/jcclrss2-64.asm | 2 -- simd/jcclrss2.asm | 2 -- simd/jccolmmx.asm | 3 +++ simd/jccolss2-64.asm | 3 +++ simd/jccolss2.asm | 3 +++ simd/jcgrammx.asm | 3 +++ simd/jcgrass2-64.asm | 3 +++ simd/jcgrass2.asm | 3 +++ simd/jcgrymmx.asm | 2 -- simd/jcgryss2-64.asm | 2 -- simd/jcgryss2.asm | 2 -- simd/jdclrmmx.asm | 2 -- simd/jdclrss2-64.asm | 2 -- simd/jdclrss2.asm | 2 -- simd/jdcolmmx.asm | 3 +++ simd/jdcolss2-64.asm | 3 +++ simd/jdcolss2.asm | 3 +++ simd/jdmermmx.asm | 3 +++ simd/jdmerss2-64.asm | 3 +++ simd/jdmerss2.asm | 3 +++ simd/jdmrgmmx.asm | 2 -- simd/jdmrgss2-64.asm | 2 -- simd/jdmrgss2.asm | 2 -- simd/jsimdext.inc | 10 ++++++++++ 27 files changed, 49 insertions(+), 25 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 726d6d0..a546e50 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -38,6 +38,8 @@ libjpeg BSD-style license, so the libjpeg-turbo library itself (libjpeg) is no longer subject to the terms of the wxWindows Library License (libturbojpeg still is-- see README-turbo.txt.) +[11] libjpeg-turbo can now be built with YASM. + 1.1.1 ===== diff --git a/acinclude.m4 b/acinclude.m4 index cc10a21..9ac9761 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3,7 +3,7 @@ # Check that NASM exists and determine flags AC_DEFUN([AC_PROG_NASM],[ -AC_CHECK_PROGS(NASM, [nasm nasmw]) +AC_CHECK_PROGS(NASM, [nasm nasmw yasm]) test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found]) AC_MSG_CHECKING([for object file format of host system]) diff --git a/simd/jcclrmmx.asm b/simd/jcclrmmx.asm index b6b8912..e095253 100644 --- a/simd/jcclrmmx.asm +++ b/simd/jcclrmmx.asm @@ -19,8 +19,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jcclrss2-64.asm b/simd/jcclrss2-64.asm index 8ca47aa..f5d6bed 100644 --- a/simd/jcclrss2-64.asm +++ b/simd/jcclrss2-64.asm @@ -17,8 +17,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 64 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jcclrss2.asm b/simd/jcclrss2.asm index 8def718..517b705 100644 --- a/simd/jcclrss2.asm +++ b/simd/jcclrss2.asm @@ -16,8 +16,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jccolmmx.asm b/simd/jccolmmx.asm index 5e7f3be..d0f0d79 100644 --- a/simd/jccolmmx.asm +++ b/simd/jccolmmx.asm @@ -51,6 +51,9 @@ PD_ONEHALF times 2 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jcclrmmx.asm" %undef RGB_RED diff --git a/simd/jccolss2-64.asm b/simd/jccolss2-64.asm index 64ee0ba..18de456 100644 --- a/simd/jccolss2-64.asm +++ b/simd/jccolss2-64.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 64 + %include "jcclrss2-64.asm" %undef RGB_RED diff --git a/simd/jccolss2.asm b/simd/jccolss2.asm index 8d1f734..7acb59c 100644 --- a/simd/jccolss2.asm +++ b/simd/jccolss2.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jcclrss2.asm" %undef RGB_RED diff --git a/simd/jcgrammx.asm b/simd/jcgrammx.asm index dd46cc5..8c96824 100644 --- a/simd/jcgrammx.asm +++ b/simd/jcgrammx.asm @@ -44,6 +44,9 @@ PD_ONEHALF times 2 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jcgrymmx.asm" %undef RGB_RED diff --git a/simd/jcgrass2-64.asm b/simd/jcgrass2-64.asm index 9f8a01a..232f329 100644 --- a/simd/jcgrass2-64.asm +++ b/simd/jcgrass2-64.asm @@ -41,6 +41,9 @@ PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 64 + %include "jcgryss2-64.asm" %undef RGB_RED diff --git a/simd/jcgrass2.asm b/simd/jcgrass2.asm index f284e0f..45ea33a 100644 --- a/simd/jcgrass2.asm +++ b/simd/jcgrass2.asm @@ -41,6 +41,9 @@ PD_ONEHALF times 4 dd (1 << (SCALEBITS-1)) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jcgryss2.asm" %undef RGB_RED diff --git a/simd/jcgrymmx.asm b/simd/jcgrymmx.asm index 481a619..bbeea09 100644 --- a/simd/jcgrymmx.asm +++ b/simd/jcgrymmx.asm @@ -20,8 +20,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jcgryss2-64.asm b/simd/jcgryss2-64.asm index 3a52ec2..23ae8af 100644 --- a/simd/jcgryss2-64.asm +++ b/simd/jcgryss2-64.asm @@ -17,8 +17,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 64 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jcgryss2.asm b/simd/jcgryss2.asm index 6eac030..c294287 100644 --- a/simd/jcgryss2.asm +++ b/simd/jcgryss2.asm @@ -17,8 +17,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jdclrmmx.asm b/simd/jdclrmmx.asm index 79772e0..1c255e8 100644 --- a/simd/jdclrmmx.asm +++ b/simd/jdclrmmx.asm @@ -19,8 +19,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jdclrss2-64.asm b/simd/jdclrss2-64.asm index 4282bd2..fdb33a3 100644 --- a/simd/jdclrss2-64.asm +++ b/simd/jdclrss2-64.asm @@ -20,8 +20,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 64 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jdclrss2.asm b/simd/jdclrss2.asm index 865fa82..3059d7d 100644 --- a/simd/jdclrss2.asm +++ b/simd/jdclrss2.asm @@ -19,8 +19,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Convert some rows of samples to the output colorspace. ; diff --git a/simd/jdcolmmx.asm b/simd/jdcolmmx.asm index 58775e8..0834bab 100644 --- a/simd/jdcolmmx.asm +++ b/simd/jdcolmmx.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 2 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jdclrmmx.asm" %undef RGB_RED diff --git a/simd/jdcolss2-64.asm b/simd/jdcolss2-64.asm index 2e97d59..d14a28a 100644 --- a/simd/jdcolss2-64.asm +++ b/simd/jdcolss2-64.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 64 + %include "jdclrss2-64.asm" %undef RGB_RED diff --git a/simd/jdcolss2.asm b/simd/jdcolss2.asm index 7ae985d..cab4dd0 100644 --- a/simd/jdcolss2.asm +++ b/simd/jdcolss2.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jdclrss2.asm" %undef RGB_RED diff --git a/simd/jdmermmx.asm b/simd/jdmermmx.asm index fd587fb..75baaa5 100644 --- a/simd/jdmermmx.asm +++ b/simd/jdmermmx.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 2 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jdmrgmmx.asm" %undef RGB_RED diff --git a/simd/jdmerss2-64.asm b/simd/jdmerss2-64.asm index 1f0b10f..a1fe963 100644 --- a/simd/jdmerss2-64.asm +++ b/simd/jdmerss2-64.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 64 + %include "jdmrgss2-64.asm" %undef RGB_RED diff --git a/simd/jdmerss2.asm b/simd/jdmerss2.asm index 2294e0d..21881b4 100644 --- a/simd/jdmerss2.asm +++ b/simd/jdmerss2.asm @@ -48,6 +48,9 @@ PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) alignz 16 ; -------------------------------------------------------------------------- + SECTION SEG_TEXT + BITS 32 + %include "jdmrgss2.asm" %undef RGB_RED diff --git a/simd/jdmrgmmx.asm b/simd/jdmrgmmx.asm index b5777a3..d0800a7 100644 --- a/simd/jdmrgmmx.asm +++ b/simd/jdmrgmmx.asm @@ -19,8 +19,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. ; diff --git a/simd/jdmrgss2-64.asm b/simd/jdmrgss2-64.asm index 121bb82..0c2503f 100644 --- a/simd/jdmrgss2-64.asm +++ b/simd/jdmrgss2-64.asm @@ -20,8 +20,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 64 ; ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. ; diff --git a/simd/jdmrgss2.asm b/simd/jdmrgss2.asm index 99b7eb9..368ac3c 100644 --- a/simd/jdmrgss2.asm +++ b/simd/jdmrgss2.asm @@ -19,8 +19,6 @@ %include "jcolsamp.inc" ; -------------------------------------------------------------------------- - SECTION SEG_TEXT - BITS 32 ; ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. ; diff --git a/simd/jsimdext.inc b/simd/jsimdext.inc index c4297f9..fd97da3 100644 --- a/simd/jsimdext.inc +++ b/simd/jsimdext.inc @@ -38,16 +38,26 @@ ; -- segment definition -- ; +%ifdef __YASM_VER__ +%define SEG_TEXT .text align=16 +%define SEG_CONST .rdata align=16 +%else %define SEG_TEXT .text align=16 public use32 class=CODE %define SEG_CONST .rdata align=16 public use32 class=CONST +%endif %elifdef WIN64 ; ----(nasm -fwin64 -DWIN64 ...)-------- ; * Microsoft Visual C++ ; -- segment definition -- ; +%ifdef __YASM_VER__ +%define SEG_TEXT .text align=16 +%define SEG_CONST .rdata align=16 +%else %define SEG_TEXT .text align=16 public use64 class=CODE %define SEG_CONST .rdata align=16 public use64 class=CONST +%endif %define EXTN(name) name ; foo() -> foo %elifdef OBJ32 ; ----(nasm -fobj -DOBJ32 ...)---------- -- 2.40.0