diff --git a/ChangeLog.txt b/ChangeLog.txt index 726d6d04..a546e50e 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 cc10a215..9ac97617 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 b6b89121..e0952531 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 8ca47aa0..f5d6bed9 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 8def718c..517b7056 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 5e7f3be9..d0f0d792 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 64ee0ba8..18de456b 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 8d1f7340..7acb59c5 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 dd46cc5b..8c968248 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 9f8a01a1..232f3299 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 f284e0fb..45ea33a8 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 481a6196..bbeea09b 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 3a52ec2e..23ae8afb 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 6eac030a..c2942879 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 79772e0c..1c255e80 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 4282bd26..fdb33a36 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 865fa824..3059d7d9 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 58775e85..0834babe 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 2e97d593..d14a28aa 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 7ae985d6..cab4dd02 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 fd587fbc..75baaa57 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 1f0b10fa..a1fe9635 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 2294e0d3..21881b40 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 b5777a3e..d0800a73 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 121bb82b..0c2503f5 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 99b7eb9f..368ac3cc 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 c4297f9c..fd97da3c 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 ...)----------