OLD | NEW |
1 Index: jmorecfg.h | 1 Index: jmorecfg.h |
2 =================================================================== | 2 =================================================================== |
3 --- jmorecfg.h (revision 64575) | 3 --- jmorecfg.h (revision 64575) |
4 +++ jmorecfg.h (working copy) | 4 +++ jmorecfg.h (working copy) |
5 @@ -159,8 +159,10 @@ | 5 @@ -159,8 +159,10 @@ |
6 /* INT32 must hold at least signed 32-bit values. */ | 6 /* INT32 must hold at least signed 32-bit values. */ |
7 | 7 |
8 #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ | 8 #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ |
9 +#ifndef _BASETSD_H_ /* basetsd.h correctly defines INT32 */ | 9 +#ifndef _BASETSD_H_ /* basetsd.h correctly defines INT32 */ |
10 typedef long INT32; | 10 typedef long INT32; |
(...skipping 27 matching lines...) Expand all Loading... |
38 +/* Begin chromium edits */ | 38 +/* Begin chromium edits */ |
39 +#include "jpeglibmangler.h" | 39 +#include "jpeglibmangler.h" |
40 +/* End chromium edits */ | 40 +/* End chromium edits */ |
41 + | 41 + |
42 /* | 42 /* |
43 * First we include the configuration files that record how this | 43 * First we include the configuration files that record how this |
44 * installation of the JPEG library is set up. jconfig.h can be | 44 * installation of the JPEG library is set up. jconfig.h can be |
45 Index: jpeglibmangler.h | 45 Index: jpeglibmangler.h |
46 =================================================================== | 46 =================================================================== |
47 --- jpeglibmangler.h (revision 0) | 47 --- jpeglibmangler.h (revision 0) |
48 +++ jpeglibmangler.h» (revision 73971) | 48 +++ jpeglibmangler.h» (revision 78340) |
49 @@ -0,0 +1,115 @@ | 49 @@ -0,0 +1,113 @@ |
50 +// Copyright (c) 2009 The Chromium Authors. All rights reserved. | 50 +// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
51 +// Use of this source code is governed by a BSD-style license that can be | 51 +// Use of this source code is governed by a BSD-style license that can be |
52 +// found in the LICENSE file. | 52 +// found in the LICENSE file. |
53 + | 53 + |
54 +#ifndef THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ | 54 +#ifndef THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ |
55 +#define THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ | 55 +#define THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ |
56 + | 56 + |
57 +// Mangle all externally visible function names so we can build our own libjpeg | 57 +// Mangle all externally visible function names so we can build our own libjpeg |
58 +// without system libraries trying to use it. | 58 +// without system libraries trying to use it. |
59 + | 59 + |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 +#define jpeg_destroy chromium_jpeg_destroy | 151 +#define jpeg_destroy chromium_jpeg_destroy |
152 +#define jpeg_resync_to_restart chromium_jpeg_resync_to_restart | 152 +#define jpeg_resync_to_restart chromium_jpeg_resync_to_restart |
153 +#define jpeg_get_small chromium_jpeg_get_small | 153 +#define jpeg_get_small chromium_jpeg_get_small |
154 +#define jpeg_free_small chromium_jpeg_free_small | 154 +#define jpeg_free_small chromium_jpeg_free_small |
155 +#define jpeg_get_large chromium_jpeg_get_large | 155 +#define jpeg_get_large chromium_jpeg_get_large |
156 +#define jpeg_free_large chromium_jpeg_free_large | 156 +#define jpeg_free_large chromium_jpeg_free_large |
157 +#define jpeg_mem_available chromium_jpeg_mem_available | 157 +#define jpeg_mem_available chromium_jpeg_mem_available |
158 +#define jpeg_open_backing_store chromium_jpeg_open_backing_store | 158 +#define jpeg_open_backing_store chromium_jpeg_open_backing_store |
159 +#define jpeg_mem_init chromium_jpeg_mem_init | 159 +#define jpeg_mem_init chromium_jpeg_mem_init |
160 +#define jpeg_mem_term chromium_jpeg_mem_term | 160 +#define jpeg_mem_term chromium_jpeg_mem_term |
161 +#define jpeg_std_message_table chromium_jpeg_std_message_table | |
162 +#define jpeg_natural_order chromium_jpeg_natural_order | |
163 + | 161 + |
164 +#endif // THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ | 162 +#endif // THIRD_PARTY_LIBJPEG_TURBO_JPEGLIBMANGLER_H_ |
165 Index: jdhuff.c | 163 Index: jdhuff.c |
166 =================================================================== | 164 =================================================================== |
167 --- jdhuff.c (revision 64575) | 165 --- jdhuff.c (revision 64575) |
168 +++ jdhuff.c (working copy) | 166 +++ jdhuff.c (working copy) |
169 @@ -658,7 +658,7 @@ | 167 @@ -658,7 +658,7 @@ |
170 symbol |= GET_BITS(1); \ | 168 symbol |= GET_BITS(1); \ |
171 size++; \ | 169 size++; \ |
172 } \ | 170 } \ |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 align 16 | 292 align 16 |
295 - global EXTN(jsimd_fdct_float_3dnow) | 293 - global EXTN(jsimd_fdct_float_3dnow) |
296 + global EXTN(jsimd_fdct_float_3dnow) PRIVATE | 294 + global EXTN(jsimd_fdct_float_3dnow) PRIVATE |
297 | 295 |
298 EXTN(jsimd_fdct_float_3dnow): | 296 EXTN(jsimd_fdct_float_3dnow): |
299 push ebp | 297 push ebp |
300 Index: simd/jcclrss2-64.asm | 298 Index: simd/jcclrss2-64.asm |
301 =================================================================== | 299 =================================================================== |
302 --- simd/jcclrss2-64.asm (revision 64575) | 300 --- simd/jcclrss2-64.asm (revision 64575) |
303 +++ simd/jcclrss2-64.asm (working copy) | 301 +++ simd/jcclrss2-64.asm (working copy) |
304 @@ -39,7 +39,7 @@ | 302 @@ -17,8 +17,12 @@ |
| 303 %include "jcolsamp.inc" |
| 304 |
| 305 ; -------------------------------------------------------------------------- |
| 306 +%ifndef NEED_SECTION |
| 307 +%define NEED_SECTION |
| 308 » SECTION»SEG_TEXT |
| 309 » BITS» 64 |
| 310 +%endif |
| 311 + |
| 312 ; |
| 313 ; Convert some rows of samples to the output colorspace. |
| 314 ; |
| 315 @@ -39,7 +43,7 @@ |
305 | 316 |
306 align 16 | 317 align 16 |
307 | 318 |
308 - global EXTN(jsimd_rgb_ycc_convert_sse2) | 319 - global EXTN(jsimd_rgb_ycc_convert_sse2) |
309 + global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE | 320 + global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE |
310 | 321 |
311 EXTN(jsimd_rgb_ycc_convert_sse2): | 322 EXTN(jsimd_rgb_ycc_convert_sse2): |
312 push rbp | 323 push rbp |
313 Index: simd/jiss2red-64.asm | 324 Index: simd/jiss2red-64.asm |
314 =================================================================== | 325 =================================================================== |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 align 16 | 583 align 16 |
573 - global EXTN(jsimd_h2v2_downsample_sse2) | 584 - global EXTN(jsimd_h2v2_downsample_sse2) |
574 + global EXTN(jsimd_h2v2_downsample_sse2) PRIVATE | 585 + global EXTN(jsimd_h2v2_downsample_sse2) PRIVATE |
575 | 586 |
576 EXTN(jsimd_h2v2_downsample_sse2): | 587 EXTN(jsimd_h2v2_downsample_sse2): |
577 push ebp | 588 push ebp |
578 Index: simd/jdmrgmmx.asm | 589 Index: simd/jdmrgmmx.asm |
579 =================================================================== | 590 =================================================================== |
580 --- simd/jdmrgmmx.asm (revision 64575) | 591 --- simd/jdmrgmmx.asm (revision 64575) |
581 +++ simd/jdmrgmmx.asm (working copy) | 592 +++ simd/jdmrgmmx.asm (working copy) |
582 @@ -42,7 +42,7 @@ | 593 @@ -19,8 +19,12 @@ |
| 594 %include "jcolsamp.inc" |
| 595 |
| 596 ; -------------------------------------------------------------------------- |
| 597 +%ifndef NEED_SECTION |
| 598 +%define NEED_SECTION |
| 599 » SECTION»SEG_TEXT |
| 600 » BITS» 32 |
| 601 +%endif |
| 602 + |
| 603 ; |
| 604 ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. |
| 605 ; |
| 606 @@ -42,7 +46,7 @@ |
583 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 607 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
584 | 608 |
585 align 16 | 609 align 16 |
586 - global EXTN(jsimd_h2v1_merged_upsample_mmx) | 610 - global EXTN(jsimd_h2v1_merged_upsample_mmx) |
587 + global EXTN(jsimd_h2v1_merged_upsample_mmx) PRIVATE | 611 + global EXTN(jsimd_h2v1_merged_upsample_mmx) PRIVATE |
588 | 612 |
589 EXTN(jsimd_h2v1_merged_upsample_mmx): | 613 EXTN(jsimd_h2v1_merged_upsample_mmx): |
590 push ebp | 614 push ebp |
591 @@ -411,7 +411,7 @@ | 615 @@ -411,7 +415,7 @@ |
592 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 616 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
593 | 617 |
594 align 16 | 618 align 16 |
595 - global EXTN(jsimd_h2v2_merged_upsample_mmx) | 619 - global EXTN(jsimd_h2v2_merged_upsample_mmx) |
596 + global EXTN(jsimd_h2v2_merged_upsample_mmx) PRIVATE | 620 + global EXTN(jsimd_h2v2_merged_upsample_mmx) PRIVATE |
597 | 621 |
598 EXTN(jsimd_h2v2_merged_upsample_mmx): | 622 EXTN(jsimd_h2v2_merged_upsample_mmx): |
599 push ebp | 623 push ebp |
600 Index: simd/jdsamss2.asm | 624 Index: simd/jdsamss2.asm |
601 =================================================================== | 625 =================================================================== |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 align 16 | 733 align 16 |
710 - global EXTN(jsimd_quantize_float_sse2) | 734 - global EXTN(jsimd_quantize_float_sse2) |
711 + global EXTN(jsimd_quantize_float_sse2) PRIVATE | 735 + global EXTN(jsimd_quantize_float_sse2) PRIVATE |
712 | 736 |
713 EXTN(jsimd_quantize_float_sse2): | 737 EXTN(jsimd_quantize_float_sse2): |
714 push ebp | 738 push ebp |
715 Index: simd/jdmrgss2.asm | 739 Index: simd/jdmrgss2.asm |
716 =================================================================== | 740 =================================================================== |
717 --- simd/jdmrgss2.asm (revision 64575) | 741 --- simd/jdmrgss2.asm (revision 64575) |
718 +++ simd/jdmrgss2.asm (working copy) | 742 +++ simd/jdmrgss2.asm (working copy) |
719 @@ -42,7 +42,7 @@ | 743 @@ -19,8 +19,12 @@ |
| 744 %include "jcolsamp.inc" |
| 745 » » » » |
| 746 ; -------------------------------------------------------------------------- |
| 747 +%ifndef NEED_SECTION |
| 748 +%define NEED_SECTION |
| 749 » SECTION»SEG_TEXT |
| 750 » BITS» 32 |
| 751 +%endif |
| 752 + |
| 753 ; |
| 754 ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. |
| 755 ; |
| 756 @@ -42,7 +46,7 @@ |
720 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 757 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
721 | 758 |
722 align 16 | 759 align 16 |
723 - global EXTN(jsimd_h2v1_merged_upsample_sse2) | 760 - global EXTN(jsimd_h2v1_merged_upsample_sse2) |
724 + global EXTN(jsimd_h2v1_merged_upsample_sse2) PRIVATE | 761 + global EXTN(jsimd_h2v1_merged_upsample_sse2) PRIVATE |
725 | 762 |
726 EXTN(jsimd_h2v1_merged_upsample_sse2): | 763 EXTN(jsimd_h2v1_merged_upsample_sse2): |
727 push ebp | 764 push ebp |
728 @@ -309,6 +309,41 @@ | 765 @@ -309,6 +313,41 @@ |
729 movdqa xmmA,xmmD | 766 movdqa xmmA,xmmD |
730 sub ecx, byte SIZEOF_XMMWORD | 767 sub ecx, byte SIZEOF_XMMWORD |
731 .column_st15: | 768 .column_st15: |
732 +%ifdef STRICT_MEMORY_ACCESS | 769 +%ifdef STRICT_MEMORY_ACCESS |
733 + ; Store the lower 8 bytes of xmmA to the output when it has enough | 770 + ; Store the lower 8 bytes of xmmA to the output when it has enough |
734 + ; space. | 771 + ; space. |
735 + cmp ecx, byte SIZEOF_MMWORD | 772 + cmp ecx, byte SIZEOF_MMWORD |
736 + jb short .column_st7 | 773 + jb short .column_st7 |
737 + movq MMWORD [edi], xmmA | 774 + movq MMWORD [edi], xmmA |
738 + add edi, byte SIZEOF_MMWORD | 775 + add edi, byte SIZEOF_MMWORD |
(...skipping 15 matching lines...) Expand all Loading... |
754 + cmp ecx, byte SIZEOF_WORD | 791 + cmp ecx, byte SIZEOF_WORD |
755 + jb short .column_st1 | 792 + jb short .column_st1 |
756 + mov WORD [edi], ax | 793 + mov WORD [edi], ax |
757 + add edi, byte SIZEOF_WORD | 794 + add edi, byte SIZEOF_WORD |
758 + sub ecx, byte SIZEOF_WORD | 795 + sub ecx, byte SIZEOF_WORD |
759 + shr eax, 16 | 796 + shr eax, 16 |
760 +.column_st1: | 797 +.column_st1: |
761 + ; Store the lower 1 byte of eax to the output when it has enough | 798 + ; Store the lower 1 byte of eax to the output when it has enough |
762 + ; space. | 799 + ; space. |
763 + test ecx, ecx | 800 + test ecx, ecx |
764 +» jz» short .nextrow | 801 +» jz» short .endcolumn |
765 + mov BYTE [edi], al | 802 + mov BYTE [edi], al |
766 +%else | 803 +%else |
767 mov eax,ecx | 804 mov eax,ecx |
768 xor ecx, byte 0x0F | 805 xor ecx, byte 0x0F |
769 shl ecx, 2 | 806 shl ecx, 2 |
770 @@ -348,6 +383,7 @@ | 807 @@ -348,6 +387,7 @@ |
771 por xmmE,xmmC | 808 por xmmE,xmmC |
772 .adj0: ; ---------------- | 809 .adj0: ; ---------------- |
773 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 810 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
774 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 811 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
775 | 812 |
776 %else ; RGB_PIXELSIZE == 4 ; ----------- | 813 %else ; RGB_PIXELSIZE == 4 ; ----------- |
777 | 814 |
778 @@ -436,6 +472,22 @@ | 815 @@ -436,6 +476,22 @@ |
779 movdqa xmmA,xmmD | 816 movdqa xmmA,xmmD |
780 sub ecx, byte SIZEOF_XMMWORD/4 | 817 sub ecx, byte SIZEOF_XMMWORD/4 |
781 .column_st15: | 818 .column_st15: |
782 +%ifdef STRICT_MEMORY_ACCESS | 819 +%ifdef STRICT_MEMORY_ACCESS |
783 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough | 820 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough |
784 + ; space. | 821 + ; space. |
785 + cmp ecx, byte SIZEOF_XMMWORD/8 | 822 + cmp ecx, byte SIZEOF_XMMWORD/8 |
786 + jb short .column_st7 | 823 + jb short .column_st7 |
787 + movq MMWORD [edi], xmmA | 824 + movq MMWORD [edi], xmmA |
788 + add edi, byte SIZEOF_XMMWORD/8*4 | 825 + add edi, byte SIZEOF_XMMWORD/8*4 |
789 + sub ecx, byte SIZEOF_XMMWORD/8 | 826 + sub ecx, byte SIZEOF_XMMWORD/8 |
790 + psrldq xmmA, SIZEOF_XMMWORD/8*4 | 827 + psrldq xmmA, SIZEOF_XMMWORD/8*4 |
791 +.column_st7: | 828 +.column_st7: |
792 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough | 829 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough |
793 + ; space. | 830 + ; space. |
794 + test ecx, ecx | 831 + test ecx, ecx |
795 +» jz» short .nextrow | 832 +» jz» short .endcolumn |
796 + movd DWORD [edi], xmmA | 833 + movd DWORD [edi], xmmA |
797 +%else | 834 +%else |
798 cmp ecx, byte SIZEOF_XMMWORD/16 | 835 cmp ecx, byte SIZEOF_XMMWORD/16 |
799 jb short .endcolumn | 836 jb short .endcolumn |
800 mov eax,ecx | 837 mov eax,ecx |
801 @@ -475,6 +527,7 @@ | 838 @@ -475,6 +531,7 @@ |
802 por xmmE,xmmG | 839 por xmmE,xmmG |
803 .adj0: ; ---------------- | 840 .adj0: ; ---------------- |
804 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 841 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
805 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 842 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
806 | 843 |
807 %endif ; RGB_PIXELSIZE ; --------------- | 844 %endif ; RGB_PIXELSIZE ; --------------- |
808 | 845 |
809 @@ -509,7 +562,7 @@ | 846 @@ -509,7 +566,7 @@ |
810 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 847 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
811 | 848 |
812 align 16 | 849 align 16 |
813 - global EXTN(jsimd_h2v2_merged_upsample_sse2) | 850 - global EXTN(jsimd_h2v2_merged_upsample_sse2) |
814 + global EXTN(jsimd_h2v2_merged_upsample_sse2) PRIVATE | 851 + global EXTN(jsimd_h2v2_merged_upsample_sse2) PRIVATE |
815 | 852 |
816 EXTN(jsimd_h2v2_merged_upsample_sse2): | 853 EXTN(jsimd_h2v2_merged_upsample_sse2): |
817 push ebp | 854 push ebp |
818 Index: simd/jfmmxint.asm | 855 Index: simd/jfmmxint.asm |
819 =================================================================== | 856 =================================================================== |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 alignz 16 | 1086 alignz 16 |
1050 - global EXTN(jconst_ycc_rgb_convert_mmx) | 1087 - global EXTN(jconst_ycc_rgb_convert_mmx) |
1051 + global EXTN(jconst_ycc_rgb_convert_mmx) PRIVATE | 1088 + global EXTN(jconst_ycc_rgb_convert_mmx) PRIVATE |
1052 | 1089 |
1053 EXTN(jconst_ycc_rgb_convert_mmx): | 1090 EXTN(jconst_ycc_rgb_convert_mmx): |
1054 | 1091 |
1055 Index: simd/jdclrss2-64.asm | 1092 Index: simd/jdclrss2-64.asm |
1056 =================================================================== | 1093 =================================================================== |
1057 --- simd/jdclrss2-64.asm (revision 64575) | 1094 --- simd/jdclrss2-64.asm (revision 64575) |
1058 +++ simd/jdclrss2-64.asm (working copy) | 1095 +++ simd/jdclrss2-64.asm (working copy) |
1059 @@ -41,7 +41,7 @@ | 1096 @@ -20,8 +20,12 @@ |
| 1097 %include "jcolsamp.inc" |
| 1098 » » » » |
| 1099 ; -------------------------------------------------------------------------- |
| 1100 +%ifndef NEED_SECTION |
| 1101 +%define NEED_SECTION |
| 1102 » SECTION»SEG_TEXT |
| 1103 » BITS» 64 |
| 1104 +%endif |
| 1105 + |
| 1106 ; |
| 1107 ; Convert some rows of samples to the output colorspace. |
| 1108 ; |
| 1109 @@ -41,7 +45,7 @@ |
1060 %define WK_NUM 2 | 1110 %define WK_NUM 2 |
1061 | 1111 |
1062 align 16 | 1112 align 16 |
1063 - global EXTN(jsimd_ycc_rgb_convert_sse2) | 1113 - global EXTN(jsimd_ycc_rgb_convert_sse2) |
1064 + global EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE | 1114 + global EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE |
1065 | 1115 |
1066 EXTN(jsimd_ycc_rgb_convert_sse2): | 1116 EXTN(jsimd_ycc_rgb_convert_sse2): |
1067 push rbp | 1117 push rbp |
1068 @@ -292,6 +292,41 @@ | 1118 @@ -292,6 +296,41 @@ |
1069 movdqa xmmA,xmmD | 1119 movdqa xmmA,xmmD |
1070 sub rcx, byte SIZEOF_XMMWORD | 1120 sub rcx, byte SIZEOF_XMMWORD |
1071 .column_st15: | 1121 .column_st15: |
1072 +%ifdef STRICT_MEMORY_ACCESS | 1122 +%ifdef STRICT_MEMORY_ACCESS |
1073 + ; Store the lower 8 bytes of xmmA to the output when it has enough | 1123 + ; Store the lower 8 bytes of xmmA to the output when it has enough |
1074 + ; space. | 1124 + ; space. |
1075 + cmp rcx, byte SIZEOF_MMWORD | 1125 + cmp rcx, byte SIZEOF_MMWORD |
1076 + jb short .column_st7 | 1126 + jb short .column_st7 |
1077 + movq MMWORD [rdi], xmmA | 1127 + movq MMWORD [rdi], xmmA |
1078 + add rdi, byte SIZEOF_MMWORD | 1128 + add rdi, byte SIZEOF_MMWORD |
(...skipping 21 matching lines...) Expand all Loading... |
1100 +.column_st1: | 1150 +.column_st1: |
1101 + ; Store the lower 1 byte of rax to the output when it has enough | 1151 + ; Store the lower 1 byte of rax to the output when it has enough |
1102 + ; space. | 1152 + ; space. |
1103 + test rcx, rcx | 1153 + test rcx, rcx |
1104 + jz short .nextrow | 1154 + jz short .nextrow |
1105 + mov BYTE [rdi], al | 1155 + mov BYTE [rdi], al |
1106 +%else | 1156 +%else |
1107 mov rax,rcx | 1157 mov rax,rcx |
1108 xor rcx, byte 0x0F | 1158 xor rcx, byte 0x0F |
1109 shl rcx, 2 | 1159 shl rcx, 2 |
1110 @@ -331,6 +366,7 @@ | 1160 @@ -331,6 +370,7 @@ |
1111 por xmmE,xmmC | 1161 por xmmE,xmmC |
1112 .adj0: ; ---------------- | 1162 .adj0: ; ---------------- |
1113 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [rdi], xmmA | 1163 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [rdi], xmmA |
1114 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1164 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1115 | 1165 |
1116 %else ; RGB_PIXELSIZE == 4 ; ----------- | 1166 %else ; RGB_PIXELSIZE == 4 ; ----------- |
1117 | 1167 |
1118 @@ -415,6 +451,22 @@ | 1168 @@ -415,6 +455,22 @@ |
1119 movdqa xmmA,xmmD | 1169 movdqa xmmA,xmmD |
1120 sub rcx, byte SIZEOF_XMMWORD/4 | 1170 sub rcx, byte SIZEOF_XMMWORD/4 |
1121 .column_st15: | 1171 .column_st15: |
1122 +%ifdef STRICT_MEMORY_ACCESS | 1172 +%ifdef STRICT_MEMORY_ACCESS |
1123 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough | 1173 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough |
1124 + ; space. | 1174 + ; space. |
1125 + cmp rcx, byte SIZEOF_XMMWORD/8 | 1175 + cmp rcx, byte SIZEOF_XMMWORD/8 |
1126 + jb short .column_st7 | 1176 + jb short .column_st7 |
1127 + movq MMWORD [rdi], xmmA | 1177 + movq MMWORD [rdi], xmmA |
1128 + add rdi, byte SIZEOF_XMMWORD/8*4 | 1178 + add rdi, byte SIZEOF_XMMWORD/8*4 |
1129 + sub rcx, byte SIZEOF_XMMWORD/8 | 1179 + sub rcx, byte SIZEOF_XMMWORD/8 |
1130 + psrldq xmmA, SIZEOF_XMMWORD/8*4 | 1180 + psrldq xmmA, SIZEOF_XMMWORD/8*4 |
1131 +.column_st7: | 1181 +.column_st7: |
1132 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough | 1182 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough |
1133 + ; space. | 1183 + ; space. |
1134 + test rcx, rcx | 1184 + test rcx, rcx |
1135 + jz short .nextrow | 1185 + jz short .nextrow |
1136 + movd DWORD [rdi], xmmA | 1186 + movd DWORD [rdi], xmmA |
1137 +%else | 1187 +%else |
1138 cmp rcx, byte SIZEOF_XMMWORD/16 | 1188 cmp rcx, byte SIZEOF_XMMWORD/16 |
1139 jb near .nextrow | 1189 jb near .nextrow |
1140 mov rax,rcx | 1190 mov rax,rcx |
1141 @@ -454,6 +506,7 @@ | 1191 @@ -454,6 +510,7 @@ |
1142 por xmmE,xmmG | 1192 por xmmE,xmmG |
1143 .adj0: ; ---------------- | 1193 .adj0: ; ---------------- |
1144 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [rdi], xmmA | 1194 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [rdi], xmmA |
1145 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1195 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1146 | 1196 |
1147 %endif ; RGB_PIXELSIZE ; --------------- | 1197 %endif ; RGB_PIXELSIZE ; --------------- |
1148 | 1198 |
1149 Index: simd/jcclrmmx.asm | 1199 Index: simd/jcclrmmx.asm |
1150 =================================================================== | 1200 =================================================================== |
1151 --- simd/jcclrmmx.asm (revision 64575) | 1201 --- simd/jcclrmmx.asm (revision 64575) |
1152 +++ simd/jcclrmmx.asm (working copy) | 1202 +++ simd/jcclrmmx.asm (working copy) |
1153 @@ -42,7 +42,7 @@ | 1203 @@ -19,8 +19,12 @@ |
| 1204 %include "jcolsamp.inc" |
| 1205 |
| 1206 ; -------------------------------------------------------------------------- |
| 1207 +%ifndef NEED_SECTION |
| 1208 +%define NEED_SECTION |
| 1209 » SECTION»SEG_TEXT |
| 1210 » BITS» 32 |
| 1211 +%endif |
| 1212 + |
| 1213 ; |
| 1214 ; Convert some rows of samples to the output colorspace. |
| 1215 ; |
| 1216 @@ -42,7 +46,7 @@ |
1154 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 1217 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
1155 | 1218 |
1156 align 16 | 1219 align 16 |
1157 - global EXTN(jsimd_rgb_ycc_convert_mmx) | 1220 - global EXTN(jsimd_rgb_ycc_convert_mmx) |
1158 + global EXTN(jsimd_rgb_ycc_convert_mmx) PRIVATE | 1221 + global EXTN(jsimd_rgb_ycc_convert_mmx) PRIVATE |
1159 | 1222 |
1160 EXTN(jsimd_rgb_ycc_convert_mmx): | 1223 EXTN(jsimd_rgb_ycc_convert_mmx): |
1161 push ebp | 1224 push ebp |
1162 Index: simd/jimmxred.asm | 1225 Index: simd/jimmxred.asm |
1163 =================================================================== | 1226 =================================================================== |
(...skipping 23 matching lines...) Expand all Loading... |
1187 align 16 | 1250 align 16 |
1188 - global EXTN(jsimd_idct_2x2_mmx) | 1251 - global EXTN(jsimd_idct_2x2_mmx) |
1189 + global EXTN(jsimd_idct_2x2_mmx) PRIVATE | 1252 + global EXTN(jsimd_idct_2x2_mmx) PRIVATE |
1190 | 1253 |
1191 EXTN(jsimd_idct_2x2_mmx): | 1254 EXTN(jsimd_idct_2x2_mmx): |
1192 push ebp | 1255 push ebp |
1193 Index: simd/jdclrmmx.asm | 1256 Index: simd/jdclrmmx.asm |
1194 =================================================================== | 1257 =================================================================== |
1195 --- simd/jdclrmmx.asm (revision 64575) | 1258 --- simd/jdclrmmx.asm (revision 64575) |
1196 +++ simd/jdclrmmx.asm (working copy) | 1259 +++ simd/jdclrmmx.asm (working copy) |
1197 @@ -42,7 +42,7 @@ | 1260 @@ -19,8 +19,12 @@ |
| 1261 %include "jcolsamp.inc" |
| 1262 |
| 1263 ; -------------------------------------------------------------------------- |
| 1264 +%ifndef NEED_SECTION |
| 1265 +%define NEED_SECTION |
| 1266 » SECTION»SEG_TEXT |
| 1267 » BITS» 32 |
| 1268 +%endif |
| 1269 + |
| 1270 ; |
| 1271 ; Convert some rows of samples to the output colorspace. |
| 1272 ; |
| 1273 @@ -42,7 +46,7 @@ |
1198 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 1274 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
1199 | 1275 |
1200 align 16 | 1276 align 16 |
1201 - global EXTN(jsimd_ycc_rgb_convert_mmx) | 1277 - global EXTN(jsimd_ycc_rgb_convert_mmx) |
1202 + global EXTN(jsimd_ycc_rgb_convert_mmx) PRIVATE | 1278 + global EXTN(jsimd_ycc_rgb_convert_mmx) PRIVATE |
1203 | 1279 |
1204 EXTN(jsimd_ycc_rgb_convert_mmx): | 1280 EXTN(jsimd_ycc_rgb_convert_mmx): |
1205 push ebp | 1281 push ebp |
1206 Index: simd/jfsseflt.asm | 1282 Index: simd/jfsseflt.asm |
1207 =================================================================== | 1283 =================================================================== |
(...skipping 14 matching lines...) Expand all Loading... |
1222 align 16 | 1298 align 16 |
1223 - global EXTN(jsimd_fdct_float_sse) | 1299 - global EXTN(jsimd_fdct_float_sse) |
1224 + global EXTN(jsimd_fdct_float_sse) PRIVATE | 1300 + global EXTN(jsimd_fdct_float_sse) PRIVATE |
1225 | 1301 |
1226 EXTN(jsimd_fdct_float_sse): | 1302 EXTN(jsimd_fdct_float_sse): |
1227 push ebp | 1303 push ebp |
1228 Index: simd/jsimdext.inc | 1304 Index: simd/jsimdext.inc |
1229 =================================================================== | 1305 =================================================================== |
1230 --- simd/jsimdext.inc (revision 64575) | 1306 --- simd/jsimdext.inc (revision 64575) |
1231 +++ simd/jsimdext.inc (working copy) | 1307 +++ simd/jsimdext.inc (working copy) |
| 1308 @@ -38,16 +38,16 @@ |
| 1309 |
| 1310 ; -- segment definition -- |
| 1311 ; |
| 1312 -%define SEG_TEXT .text align=16 public use32 class=CODE |
| 1313 -%define SEG_CONST .rdata align=16 public use32 class=CONST |
| 1314 +%define SEG_TEXT .text align=16 ; public use32 class=CODE |
| 1315 +%define SEG_CONST .rdata align=16 ; public use32 class=CONST |
| 1316 |
| 1317 %elifdef WIN64 ; ----(nasm -fwin64 -DWIN64 ...)-------- |
| 1318 ; * Microsoft Visual C++ |
| 1319 |
| 1320 ; -- segment definition -- |
| 1321 ; |
| 1322 -%define SEG_TEXT .text align=16 public use64 class=CODE |
| 1323 -%define SEG_CONST .rdata align=16 public use64 class=CONST |
| 1324 +%define SEG_TEXT .text align=16 ; public use64 class=CODE |
| 1325 +%define SEG_CONST .rdata align=16 ; public use64 class=CONST |
| 1326 %ifdef MSVC |
| 1327 %define EXTN(name) name ; foo() -> foo |
| 1328 %endif |
1232 @@ -369,4 +369,14 @@ | 1329 @@ -369,4 +369,14 @@ |
1233 ; | 1330 ; |
1234 %include "jsimdcfg.inc" | 1331 %include "jsimdcfg.inc" |
1235 | 1332 |
1236 +; Begin chromium edits | 1333 +; Begin chromium edits |
1237 +%ifdef MACHO ; ----(nasm -fmacho -DMACHO ...)-------- | 1334 +%ifdef MACHO ; ----(nasm -fmacho -DMACHO ...)-------- |
1238 +%define PRIVATE :private_extern | 1335 +%define PRIVATE :private_extern |
1239 +%elifdef ELF ; ----(nasm -felf[64] -DELF ...)------------ | 1336 +%elifdef ELF ; ----(nasm -felf[64] -DELF ...)------------ |
1240 +%define PRIVATE :hidden | 1337 +%define PRIVATE :hidden |
1241 +%else | 1338 +%else |
1242 +%define PRIVATE | 1339 +%define PRIVATE |
1243 +%endif | 1340 +%endif |
1244 +; End chromium edits | 1341 +; End chromium edits |
1245 + | 1342 + |
1246 ; -------------------------------------------------------------------------- | 1343 ; -------------------------------------------------------------------------- |
1247 Index: simd/jdmrgss2-64.asm | 1344 Index: simd/jdmrgss2-64.asm |
1248 =================================================================== | 1345 =================================================================== |
1249 --- simd/jdmrgss2-64.asm (revision 64575) | 1346 --- simd/jdmrgss2-64.asm (revision 64575) |
1250 +++ simd/jdmrgss2-64.asm (working copy) | 1347 +++ simd/jdmrgss2-64.asm (working copy) |
1251 @@ -41,7 +41,7 @@ | 1348 @@ -20,8 +20,12 @@ |
| 1349 %include "jcolsamp.inc" |
| 1350 » » » » |
| 1351 ; -------------------------------------------------------------------------- |
| 1352 +%ifndef NEED_SECTION |
| 1353 +%define NEED_SECTION |
| 1354 » SECTION»SEG_TEXT |
| 1355 » BITS» 64 |
| 1356 +%endif |
| 1357 + |
| 1358 ; |
| 1359 ; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. |
| 1360 ; |
| 1361 @@ -41,7 +45,7 @@ |
1252 %define WK_NUM 3 | 1362 %define WK_NUM 3 |
1253 | 1363 |
1254 align 16 | 1364 align 16 |
1255 - global EXTN(jsimd_h2v1_merged_upsample_sse2) | 1365 - global EXTN(jsimd_h2v1_merged_upsample_sse2) |
1256 + global EXTN(jsimd_h2v1_merged_upsample_sse2) PRIVATE | 1366 + global EXTN(jsimd_h2v1_merged_upsample_sse2) PRIVATE |
1257 | 1367 |
1258 EXTN(jsimd_h2v1_merged_upsample_sse2): | 1368 EXTN(jsimd_h2v1_merged_upsample_sse2): |
1259 push rbp | 1369 push rbp |
1260 @@ -296,6 +296,41 @@ | 1370 @@ -296,6 +300,41 @@ |
1261 movdqa xmmA,xmmD | 1371 movdqa xmmA,xmmD |
1262 sub rcx, byte SIZEOF_XMMWORD | 1372 sub rcx, byte SIZEOF_XMMWORD |
1263 .column_st15: | 1373 .column_st15: |
1264 +%ifdef STRICT_MEMORY_ACCESS | 1374 +%ifdef STRICT_MEMORY_ACCESS |
1265 + ; Store the lower 8 bytes of xmmA to the output when it has enough | 1375 + ; Store the lower 8 bytes of xmmA to the output when it has enough |
1266 + ; space. | 1376 + ; space. |
1267 + cmp rcx, byte SIZEOF_MMWORD | 1377 + cmp rcx, byte SIZEOF_MMWORD |
1268 + jb short .column_st7 | 1378 + jb short .column_st7 |
1269 + movq MMWORD [rdi], xmmA | 1379 + movq MMWORD [rdi], xmmA |
1270 + add rdi, byte SIZEOF_MMWORD | 1380 + add rdi, byte SIZEOF_MMWORD |
(...skipping 15 matching lines...) Expand all Loading... |
1286 + cmp rcx, byte SIZEOF_WORD | 1396 + cmp rcx, byte SIZEOF_WORD |
1287 + jb short .column_st1 | 1397 + jb short .column_st1 |
1288 + mov WORD [rdi], ax | 1398 + mov WORD [rdi], ax |
1289 + add rdi, byte SIZEOF_WORD | 1399 + add rdi, byte SIZEOF_WORD |
1290 + sub rcx, byte SIZEOF_WORD | 1400 + sub rcx, byte SIZEOF_WORD |
1291 + shr rax, 16 | 1401 + shr rax, 16 |
1292 +.column_st1: | 1402 +.column_st1: |
1293 + ; Store the lower 1 byte of rax to the output when it has enough | 1403 + ; Store the lower 1 byte of rax to the output when it has enough |
1294 + ; space. | 1404 + ; space. |
1295 + test rcx, rcx | 1405 + test rcx, rcx |
1296 +» jz» short .nextrow | 1406 +» jz» short .endcolumn |
1297 + mov BYTE [rdi], al | 1407 + mov BYTE [rdi], al |
1298 +%else | 1408 +%else |
1299 mov rax,rcx | 1409 mov rax,rcx |
1300 xor rcx, byte 0x0F | 1410 xor rcx, byte 0x0F |
1301 shl rcx, 2 | 1411 shl rcx, 2 |
1302 @@ -335,6 +370,7 @@ | 1412 @@ -335,6 +374,7 @@ |
1303 por xmmE,xmmC | 1413 por xmmE,xmmC |
1304 .adj0: ; ---------------- | 1414 .adj0: ; ---------------- |
1305 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 1415 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
1306 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1416 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1307 | 1417 |
1308 %else ; RGB_PIXELSIZE == 4 ; ----------- | 1418 %else ; RGB_PIXELSIZE == 4 ; ----------- |
1309 | 1419 |
1310 @@ -422,6 +458,22 @@ | 1420 @@ -422,6 +462,22 @@ |
1311 movdqa xmmA,xmmD | 1421 movdqa xmmA,xmmD |
1312 sub rcx, byte SIZEOF_XMMWORD/4 | 1422 sub rcx, byte SIZEOF_XMMWORD/4 |
1313 .column_st15: | 1423 .column_st15: |
1314 +%ifdef STRICT_MEMORY_ACCESS | 1424 +%ifdef STRICT_MEMORY_ACCESS |
1315 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough | 1425 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough |
1316 + ; space. | 1426 + ; space. |
1317 + cmp rcx, byte SIZEOF_XMMWORD/8 | 1427 + cmp rcx, byte SIZEOF_XMMWORD/8 |
1318 + jb short .column_st7 | 1428 + jb short .column_st7 |
1319 + movq MMWORD [rdi], xmmA | 1429 + movq MMWORD [rdi], xmmA |
1320 + add rdi, byte SIZEOF_XMMWORD/8*4 | 1430 + add rdi, byte SIZEOF_XMMWORD/8*4 |
1321 + sub rcx, byte SIZEOF_XMMWORD/8 | 1431 + sub rcx, byte SIZEOF_XMMWORD/8 |
1322 + psrldq xmmA, SIZEOF_XMMWORD/8*4 | 1432 + psrldq xmmA, SIZEOF_XMMWORD/8*4 |
1323 +.column_st7: | 1433 +.column_st7: |
1324 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough | 1434 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough |
1325 + ; space. | 1435 + ; space. |
1326 + test rcx, rcx | 1436 + test rcx, rcx |
1327 +» jz» short .nextrow | 1437 +» jz» short .endcolumn |
1328 + movd DWORD [rdi], xmmA | 1438 + movd DWORD [rdi], xmmA |
1329 +%else | 1439 +%else |
1330 cmp rcx, byte SIZEOF_XMMWORD/16 | 1440 cmp rcx, byte SIZEOF_XMMWORD/16 |
1331 jb near .endcolumn | 1441 jb near .endcolumn |
1332 mov rax,rcx | 1442 mov rax,rcx |
1333 @@ -461,6 +513,7 @@ | 1443 @@ -461,6 +517,7 @@ |
1334 por xmmE,xmmG | 1444 por xmmE,xmmG |
1335 .adj0: ; ---------------- | 1445 .adj0: ; ---------------- |
1336 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 1446 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
1337 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1447 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1338 | 1448 |
1339 %endif ; RGB_PIXELSIZE ; --------------- | 1449 %endif ; RGB_PIXELSIZE ; --------------- |
1340 | 1450 |
1341 @@ -492,7 +545,7 @@ | 1451 @@ -492,7 +549,7 @@ |
1342 ; r13 = JSAMPARRAY output_buf | 1452 ; r13 = JSAMPARRAY output_buf |
1343 | 1453 |
1344 align 16 | 1454 align 16 |
1345 - global EXTN(jsimd_h2v2_merged_upsample_sse2) | 1455 - global EXTN(jsimd_h2v2_merged_upsample_sse2) |
1346 + global EXTN(jsimd_h2v2_merged_upsample_sse2) PRIVATE | 1456 + global EXTN(jsimd_h2v2_merged_upsample_sse2) PRIVATE |
1347 | 1457 |
1348 EXTN(jsimd_h2v2_merged_upsample_sse2): | 1458 EXTN(jsimd_h2v2_merged_upsample_sse2): |
1349 push rbp | 1459 push rbp |
1350 Index: simd/jccolss2.asm | 1460 Index: simd/jccolss2.asm |
1351 =================================================================== | 1461 =================================================================== |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 align 16 | 1537 align 16 |
1428 - global EXTN(jsimd_quantize_sse2) | 1538 - global EXTN(jsimd_quantize_sse2) |
1429 + global EXTN(jsimd_quantize_sse2) PRIVATE | 1539 + global EXTN(jsimd_quantize_sse2) PRIVATE |
1430 | 1540 |
1431 EXTN(jsimd_quantize_sse2): | 1541 EXTN(jsimd_quantize_sse2): |
1432 push rbp | 1542 push rbp |
1433 Index: simd/jcclrss2.asm | 1543 Index: simd/jcclrss2.asm |
1434 =================================================================== | 1544 =================================================================== |
1435 --- simd/jcclrss2.asm (revision 64575) | 1545 --- simd/jcclrss2.asm (revision 64575) |
1436 +++ simd/jcclrss2.asm (working copy) | 1546 +++ simd/jcclrss2.asm (working copy) |
1437 @@ -40,7 +40,7 @@ | 1547 @@ -16,8 +16,12 @@ |
| 1548 %include "jcolsamp.inc" |
| 1549 |
| 1550 ; -------------------------------------------------------------------------- |
| 1551 +%ifndef NEED_SECTION |
| 1552 +%define NEED_SECTION |
| 1553 » SECTION»SEG_TEXT |
| 1554 » BITS» 32 |
| 1555 +%endif |
| 1556 + |
| 1557 ; |
| 1558 ; Convert some rows of samples to the output colorspace. |
| 1559 ; |
| 1560 @@ -40,7 +44,7 @@ |
1438 | 1561 |
1439 align 16 | 1562 align 16 |
1440 | 1563 |
1441 - global EXTN(jsimd_rgb_ycc_convert_sse2) | 1564 - global EXTN(jsimd_rgb_ycc_convert_sse2) |
1442 + global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE | 1565 + global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE |
1443 | 1566 |
1444 EXTN(jsimd_rgb_ycc_convert_sse2): | 1567 EXTN(jsimd_rgb_ycc_convert_sse2): |
1445 push ebp | 1568 push ebp |
1446 Index: simd/jiss2red.asm | 1569 Index: simd/jiss2red.asm |
1447 =================================================================== | 1570 =================================================================== |
(...skipping 23 matching lines...) Expand all Loading... |
1471 align 16 | 1594 align 16 |
1472 - global EXTN(jsimd_idct_2x2_sse2) | 1595 - global EXTN(jsimd_idct_2x2_sse2) |
1473 + global EXTN(jsimd_idct_2x2_sse2) PRIVATE | 1596 + global EXTN(jsimd_idct_2x2_sse2) PRIVATE |
1474 | 1597 |
1475 EXTN(jsimd_idct_2x2_sse2): | 1598 EXTN(jsimd_idct_2x2_sse2): |
1476 push ebp | 1599 push ebp |
1477 Index: simd/jdclrss2.asm | 1600 Index: simd/jdclrss2.asm |
1478 =================================================================== | 1601 =================================================================== |
1479 --- simd/jdclrss2.asm (revision 64575) | 1602 --- simd/jdclrss2.asm (revision 64575) |
1480 +++ simd/jdclrss2.asm (working copy) | 1603 +++ simd/jdclrss2.asm (working copy) |
1481 @@ -42,7 +42,7 @@ | 1604 @@ -19,8 +19,12 @@ |
| 1605 %include "jcolsamp.inc" |
| 1606 » » » » |
| 1607 ; -------------------------------------------------------------------------- |
| 1608 +%ifndef NEED_SECTION |
| 1609 +%define NEED_SECTION |
| 1610 » SECTION»SEG_TEXT |
| 1611 » BITS» 32 |
| 1612 +%endif |
| 1613 + |
| 1614 ; |
| 1615 ; Convert some rows of samples to the output colorspace. |
| 1616 ; |
| 1617 @@ -42,7 +46,7 @@ |
1482 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 1618 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
1483 | 1619 |
1484 align 16 | 1620 align 16 |
1485 - global EXTN(jsimd_ycc_rgb_convert_sse2) | 1621 - global EXTN(jsimd_ycc_rgb_convert_sse2) |
1486 + global EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE | 1622 + global EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE |
1487 | 1623 |
1488 EXTN(jsimd_ycc_rgb_convert_sse2): | 1624 EXTN(jsimd_ycc_rgb_convert_sse2): |
1489 push ebp | 1625 push ebp |
1490 @@ -304,6 +304,41 @@ | 1626 @@ -304,6 +308,41 @@ |
1491 movdqa xmmA,xmmD | 1627 movdqa xmmA,xmmD |
1492 sub ecx, byte SIZEOF_XMMWORD | 1628 sub ecx, byte SIZEOF_XMMWORD |
1493 .column_st15: | 1629 .column_st15: |
1494 +%ifdef STRICT_MEMORY_ACCESS | 1630 +%ifdef STRICT_MEMORY_ACCESS |
1495 + ; Store the lower 8 bytes of xmmA to the output when it has enough | 1631 + ; Store the lower 8 bytes of xmmA to the output when it has enough |
1496 + ; space. | 1632 + ; space. |
1497 + cmp ecx, byte SIZEOF_MMWORD | 1633 + cmp ecx, byte SIZEOF_MMWORD |
1498 + jb short .column_st7 | 1634 + jb short .column_st7 |
1499 + movq MMWORD [edi], xmmA | 1635 + movq MMWORD [edi], xmmA |
1500 + add edi, byte SIZEOF_MMWORD | 1636 + add edi, byte SIZEOF_MMWORD |
(...skipping 21 matching lines...) Expand all Loading... |
1522 +.column_st1: | 1658 +.column_st1: |
1523 + ; Store the lower 1 byte of eax to the output when it has enough | 1659 + ; Store the lower 1 byte of eax to the output when it has enough |
1524 + ; space. | 1660 + ; space. |
1525 + test ecx, ecx | 1661 + test ecx, ecx |
1526 + jz short .nextrow | 1662 + jz short .nextrow |
1527 + mov BYTE [edi], al | 1663 + mov BYTE [edi], al |
1528 +%else | 1664 +%else |
1529 mov eax,ecx | 1665 mov eax,ecx |
1530 xor ecx, byte 0x0F | 1666 xor ecx, byte 0x0F |
1531 shl ecx, 2 | 1667 shl ecx, 2 |
1532 @@ -343,6 +378,7 @@ | 1668 @@ -343,6 +382,7 @@ |
1533 por xmmE,xmmC | 1669 por xmmE,xmmC |
1534 .adj0: ; ---------------- | 1670 .adj0: ; ---------------- |
1535 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 1671 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
1536 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1672 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1537 | 1673 |
1538 %else ; RGB_PIXELSIZE == 4 ; ----------- | 1674 %else ; RGB_PIXELSIZE == 4 ; ----------- |
1539 | 1675 |
1540 @@ -428,6 +464,22 @@ | 1676 @@ -428,6 +468,22 @@ |
1541 movdqa xmmA,xmmD | 1677 movdqa xmmA,xmmD |
1542 sub ecx, byte SIZEOF_XMMWORD/4 | 1678 sub ecx, byte SIZEOF_XMMWORD/4 |
1543 .column_st15: | 1679 .column_st15: |
1544 +%ifdef STRICT_MEMORY_ACCESS | 1680 +%ifdef STRICT_MEMORY_ACCESS |
1545 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough | 1681 + ; Store two pixels (8 bytes) of xmmA to the output when it has enough |
1546 + ; space. | 1682 + ; space. |
1547 + cmp ecx, byte SIZEOF_XMMWORD/8 | 1683 + cmp ecx, byte SIZEOF_XMMWORD/8 |
1548 + jb short .column_st7 | 1684 + jb short .column_st7 |
1549 + movq MMWORD [edi], xmmA | 1685 + movq MMWORD [edi], xmmA |
1550 + add edi, byte SIZEOF_XMMWORD/8*4 | 1686 + add edi, byte SIZEOF_XMMWORD/8*4 |
1551 + sub ecx, byte SIZEOF_XMMWORD/8 | 1687 + sub ecx, byte SIZEOF_XMMWORD/8 |
1552 + psrldq xmmA, SIZEOF_XMMWORD/8*4 | 1688 + psrldq xmmA, SIZEOF_XMMWORD/8*4 |
1553 +.column_st7: | 1689 +.column_st7: |
1554 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough | 1690 + ; Store one pixel (4 bytes) of xmmA to the output when it has enough |
1555 + ; space. | 1691 + ; space. |
1556 + test ecx, ecx | 1692 + test ecx, ecx |
1557 + jz short .nextrow | 1693 + jz short .nextrow |
1558 + movd DWORD [edi], xmmA | 1694 + movd DWORD [edi], xmmA |
1559 +%else | 1695 +%else |
1560 cmp ecx, byte SIZEOF_XMMWORD/16 | 1696 cmp ecx, byte SIZEOF_XMMWORD/16 |
1561 jb short .nextrow | 1697 jb short .nextrow |
1562 mov eax,ecx | 1698 mov eax,ecx |
1563 @@ -467,6 +519,7 @@ | 1699 @@ -467,6 +523,7 @@ |
1564 por xmmE,xmmG | 1700 por xmmE,xmmG |
1565 .adj0: ; ---------------- | 1701 .adj0: ; ---------------- |
1566 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA | 1702 maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA |
1567 +%endif ; STRICT_MEMORY_ACCESS ; --------------- | 1703 +%endif ; STRICT_MEMORY_ACCESS ; --------------- |
1568 | 1704 |
1569 %endif ; RGB_PIXELSIZE ; --------------- | 1705 %endif ; RGB_PIXELSIZE ; --------------- |
1570 | 1706 |
1571 Index: simd/jdmerss2.asm | 1707 Index: simd/jdmerss2.asm |
1572 =================================================================== | 1708 =================================================================== |
1573 --- simd/jdmerss2.asm (revision 64575) | 1709 --- simd/jdmerss2.asm (revision 64575) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 | 1798 |
1663 @@ -80,7 +80,7 @@ | 1799 @@ -80,7 +80,7 @@ |
1664 %define WK_NUM 2 | 1800 %define WK_NUM 2 |
1665 | 1801 |
1666 align 16 | 1802 align 16 |
1667 - global EXTN(jsimd_fdct_ifast_mmx) | 1803 - global EXTN(jsimd_fdct_ifast_mmx) |
1668 + global EXTN(jsimd_fdct_ifast_mmx) PRIVATE | 1804 + global EXTN(jsimd_fdct_ifast_mmx) PRIVATE |
1669 | 1805 |
1670 EXTN(jsimd_fdct_ifast_mmx): | 1806 EXTN(jsimd_fdct_ifast_mmx): |
1671 push ebp | 1807 push ebp |
OLD | NEW |