]> granicus.if.org Git - libjpeg-turbo/commitdiff
x86: Fix "short jump is out of range" w/ NASM<2.04 1.5.2
authorDRC <information@libjpeg-turbo.org>
Fri, 7 Jul 2017 20:15:19 +0000 (15:15 -0500)
committerDRC <information@libjpeg-turbo.org>
Fri, 7 Jul 2017 20:28:49 +0000 (15:28 -0500)
ChangeLog.md
simd/jchuff-sse2.asm

index d694787946f311635619d870df36ad27da0d4468..2aaa50c14846896a6335df781d230cc5243005a0 100644 (file)
@@ -64,6 +64,10 @@ timer, in order to improve the consistency of the results.  Furthermore, the
 `-warmup` option is now used to specify the amount of warmup time rather than
 the number of warmup iterations.
 
+11. Fixed an error (`short jump is out of range`) that occurred when assembling
+the 32-bit x86 SIMD extensions with NASM versions prior to 2.04.  This was a
+regression introduced by 1.5 beta1[12].
+
 
 1.5.1
 =====
index 36d1f2db665d95d59956bf6839491aa2a8ffcfae..b81db75b43058b434a1f64a7c0d2b8912997e35a 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; jchuff-sse2.asm - Huffman entropy encoding (SSE2)
 ;
-; Copyright (C) 2009-2011, 2014-2016, D. R. Commander.
+; Copyright (C) 2009-2011, 2014-2017, D. R. Commander.
 ; Copyright (C) 2015, Matthieu Darbois.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
@@ -288,13 +288,13 @@ EXTN(jsimd_huff_encode_one_block_sse2):
 
 .BLOOP:
         bsf ecx, edx  ; r = __builtin_ctzl(index);
-        jz .ELOOP
+        jz near .ELOOP
         lea esi, [esi+ecx*2]  ; k += r;
         shr edx, cl  ; index >>= r;
         mov DWORD [esp+temp3], edx
 .BRLOOP:
         cmp ecx, 16  ; while (r > 15) {
-        jl .ERLOOP
+        jl near .ERLOOP
         sub ecx, 16 ; r -= 16;
         mov DWORD [esp+temp], ecx
         mov   eax, INT [ebp + 240 * 4]  ; code_0xf0 = actbl->ehufco[0xf0];
@@ -348,7 +348,7 @@ EXTN(jsimd_huff_encode_one_block_sse2):
         sub eax, esi
         shr eax, 1
         bsf ecx, edx  ; r = __builtin_ctzl(index);
-        jz .ELOOP2
+        jz near .ELOOP2
         shr edx, cl  ; index >>= r;
         add ecx, eax
         lea esi, [esi+ecx*2]  ; k += r;
@@ -356,13 +356,13 @@ EXTN(jsimd_huff_encode_one_block_sse2):
         jmp .BRLOOP2
 .BLOOP2:
         bsf ecx, edx  ; r = __builtin_ctzl(index);
-        jz .ELOOP2
+        jz near .ELOOP2
         lea esi, [esi+ecx*2]  ; k += r;
         shr edx, cl  ; index >>= r;
         mov DWORD [esp+temp3], edx
 .BRLOOP2:
         cmp ecx, 16  ; while (r > 15) {
-        jl .ERLOOP2
+        jl near .ERLOOP2
         sub ecx, 16  ; r -= 16;
         mov DWORD [esp+temp], ecx
         mov   eax, INT [ebp + 240 * 4]  ; code_0xf0 = actbl->ehufco[0xf0];