| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function(global, utils) { | 5 (function(global, utils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 return %NAMEGreaterThan(a, b); | 240 return %NAMEGreaterThan(a, b); |
| 241 } | 241 } |
| 242 | 242 |
| 243 function NAMEGreaterThanOrEqualJS(a, b) { | 243 function NAMEGreaterThanOrEqualJS(a, b) { |
| 244 return %NAMEGreaterThanOrEqual(a, b); | 244 return %NAMEGreaterThanOrEqual(a, b); |
| 245 } | 245 } |
| 246 | 246 |
| 247 function NAMELoadJS(tarray, index) { | 247 function NAMELoadJS(tarray, index) { |
| 248 return %NAMELoad(tarray, index); | 248 return %NAMELoad(tarray, index); |
| 249 } | 249 } |
| 250 |
| 251 function NAMEStoreJS(tarray, index, a) { |
| 252 return %NAMEStore(tarray, index, a); |
| 253 } |
| 250 endmacro | 254 endmacro |
| 251 | 255 |
| 252 SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS) | 256 SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS) |
| 253 | 257 |
| 254 macro SIMD_LOGICAL_TYPES(FUNCTION) | 258 macro SIMD_LOGICAL_TYPES(FUNCTION) |
| 255 SIMD_INT_TYPES(FUNCTION) | 259 SIMD_INT_TYPES(FUNCTION) |
| 256 SIMD_UINT_TYPES(FUNCTION) | 260 SIMD_UINT_TYPES(FUNCTION) |
| 257 SIMD_BOOL_TYPES(FUNCTION) | 261 SIMD_BOOL_TYPES(FUNCTION) |
| 258 endmacro | 262 endmacro |
| 259 | 263 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 FUNCTION(Int32x4, 3) | 365 FUNCTION(Int32x4, 3) |
| 362 FUNCTION(Uint32x4, 1) | 366 FUNCTION(Uint32x4, 1) |
| 363 FUNCTION(Uint32x4, 2) | 367 FUNCTION(Uint32x4, 2) |
| 364 FUNCTION(Uint32x4, 3) | 368 FUNCTION(Uint32x4, 3) |
| 365 endmacro | 369 endmacro |
| 366 | 370 |
| 367 macro DECLARE_LOADN_STOREN_FUNCTIONS(NAME, COUNT) | 371 macro DECLARE_LOADN_STOREN_FUNCTIONS(NAME, COUNT) |
| 368 function NAMELoadCOUNTJS(tarray, index) { | 372 function NAMELoadCOUNTJS(tarray, index) { |
| 369 return %NAMELoadCOUNT(tarray, index); | 373 return %NAMELoadCOUNT(tarray, index); |
| 370 } | 374 } |
| 375 |
| 376 function NAMEStoreCOUNTJS(tarray, index, a) { |
| 377 return %NAMEStoreCOUNT(tarray, index, a); |
| 378 } |
| 371 endmacro | 379 endmacro |
| 372 | 380 |
| 373 SIMD_LOADN_STOREN_TYPES(DECLARE_LOADN_STOREN_FUNCTIONS) | 381 SIMD_LOADN_STOREN_TYPES(DECLARE_LOADN_STOREN_FUNCTIONS) |
| 374 | 382 |
| 375 //------------------------------------------------------------------- | 383 //------------------------------------------------------------------- |
| 376 | 384 |
| 377 macro SIMD_X4_TYPES(FUNCTION) | 385 macro SIMD_X4_TYPES(FUNCTION) |
| 378 FUNCTION(Float32x4) | 386 FUNCTION(Float32x4) |
| 379 FUNCTION(Int32x4) | 387 FUNCTION(Int32x4) |
| 380 FUNCTION(Uint32x4) | 388 FUNCTION(Uint32x4) |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 'fromInt32x4Bits', Float32x4FromInt32x4BitsJS, | 629 'fromInt32x4Bits', Float32x4FromInt32x4BitsJS, |
| 622 'fromUint32x4Bits', Float32x4FromUint32x4BitsJS, | 630 'fromUint32x4Bits', Float32x4FromUint32x4BitsJS, |
| 623 'fromInt16x8Bits', Float32x4FromInt16x8BitsJS, | 631 'fromInt16x8Bits', Float32x4FromInt16x8BitsJS, |
| 624 'fromUint16x8Bits', Float32x4FromUint16x8BitsJS, | 632 'fromUint16x8Bits', Float32x4FromUint16x8BitsJS, |
| 625 'fromInt8x16Bits', Float32x4FromInt8x16BitsJS, | 633 'fromInt8x16Bits', Float32x4FromInt8x16BitsJS, |
| 626 'fromUint8x16Bits', Float32x4FromUint8x16BitsJS, | 634 'fromUint8x16Bits', Float32x4FromUint8x16BitsJS, |
| 627 'load', Float32x4LoadJS, | 635 'load', Float32x4LoadJS, |
| 628 'load1', Float32x4Load1JS, | 636 'load1', Float32x4Load1JS, |
| 629 'load2', Float32x4Load2JS, | 637 'load2', Float32x4Load2JS, |
| 630 'load3', Float32x4Load3JS, | 638 'load3', Float32x4Load3JS, |
| 639 'store', Float32x4StoreJS, |
| 640 'store1', Float32x4Store1JS, |
| 641 'store2', Float32x4Store2JS, |
| 642 'store3', Float32x4Store3JS, |
| 631 ]); | 643 ]); |
| 632 | 644 |
| 633 utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [ | 645 utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [ |
| 634 'splat', Int32x4Splat, | 646 'splat', Int32x4Splat, |
| 635 'check', Int32x4CheckJS, | 647 'check', Int32x4CheckJS, |
| 636 'extractLane', Int32x4ExtractLaneJS, | 648 'extractLane', Int32x4ExtractLaneJS, |
| 637 'replaceLane', Int32x4ReplaceLaneJS, | 649 'replaceLane', Int32x4ReplaceLaneJS, |
| 638 'neg', Int32x4NegJS, | 650 'neg', Int32x4NegJS, |
| 639 'add', Int32x4AddJS, | 651 'add', Int32x4AddJS, |
| 640 'sub', Int32x4SubJS, | 652 'sub', Int32x4SubJS, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 661 'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS, | 673 'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS, |
| 662 'fromUint32x4Bits', Int32x4FromUint32x4BitsJS, | 674 'fromUint32x4Bits', Int32x4FromUint32x4BitsJS, |
| 663 'fromInt16x8Bits', Int32x4FromInt16x8BitsJS, | 675 'fromInt16x8Bits', Int32x4FromInt16x8BitsJS, |
| 664 'fromUint16x8Bits', Int32x4FromUint16x8BitsJS, | 676 'fromUint16x8Bits', Int32x4FromUint16x8BitsJS, |
| 665 'fromInt8x16Bits', Int32x4FromInt8x16BitsJS, | 677 'fromInt8x16Bits', Int32x4FromInt8x16BitsJS, |
| 666 'fromUint8x16Bits', Int32x4FromUint8x16BitsJS, | 678 'fromUint8x16Bits', Int32x4FromUint8x16BitsJS, |
| 667 'load', Int32x4LoadJS, | 679 'load', Int32x4LoadJS, |
| 668 'load1', Int32x4Load1JS, | 680 'load1', Int32x4Load1JS, |
| 669 'load2', Int32x4Load2JS, | 681 'load2', Int32x4Load2JS, |
| 670 'load3', Int32x4Load3JS, | 682 'load3', Int32x4Load3JS, |
| 683 'store', Int32x4StoreJS, |
| 684 'store1', Int32x4Store1JS, |
| 685 'store2', Int32x4Store2JS, |
| 686 'store3', Int32x4Store3JS, |
| 671 ]); | 687 ]); |
| 672 | 688 |
| 673 utils.InstallFunctions(GlobalUint32x4, DONT_ENUM, [ | 689 utils.InstallFunctions(GlobalUint32x4, DONT_ENUM, [ |
| 674 'splat', Uint32x4Splat, | 690 'splat', Uint32x4Splat, |
| 675 'check', Uint32x4CheckJS, | 691 'check', Uint32x4CheckJS, |
| 676 'extractLane', Uint32x4ExtractLaneJS, | 692 'extractLane', Uint32x4ExtractLaneJS, |
| 677 'replaceLane', Uint32x4ReplaceLaneJS, | 693 'replaceLane', Uint32x4ReplaceLaneJS, |
| 678 'add', Uint32x4AddJS, | 694 'add', Uint32x4AddJS, |
| 679 'sub', Uint32x4SubJS, | 695 'sub', Uint32x4SubJS, |
| 680 'mul', Uint32x4MulJS, | 696 'mul', Uint32x4MulJS, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 701 'fromFloat32x4Bits', Uint32x4FromFloat32x4BitsJS, | 717 'fromFloat32x4Bits', Uint32x4FromFloat32x4BitsJS, |
| 702 'fromInt32x4Bits', Uint32x4FromInt32x4BitsJS, | 718 'fromInt32x4Bits', Uint32x4FromInt32x4BitsJS, |
| 703 'fromInt16x8Bits', Uint32x4FromInt16x8BitsJS, | 719 'fromInt16x8Bits', Uint32x4FromInt16x8BitsJS, |
| 704 'fromUint16x8Bits', Uint32x4FromUint16x8BitsJS, | 720 'fromUint16x8Bits', Uint32x4FromUint16x8BitsJS, |
| 705 'fromInt8x16Bits', Uint32x4FromInt8x16BitsJS, | 721 'fromInt8x16Bits', Uint32x4FromInt8x16BitsJS, |
| 706 'fromUint8x16Bits', Uint32x4FromUint8x16BitsJS, | 722 'fromUint8x16Bits', Uint32x4FromUint8x16BitsJS, |
| 707 'load', Uint32x4LoadJS, | 723 'load', Uint32x4LoadJS, |
| 708 'load1', Uint32x4Load1JS, | 724 'load1', Uint32x4Load1JS, |
| 709 'load2', Uint32x4Load2JS, | 725 'load2', Uint32x4Load2JS, |
| 710 'load3', Uint32x4Load3JS, | 726 'load3', Uint32x4Load3JS, |
| 727 'store', Uint32x4StoreJS, |
| 728 'store1', Uint32x4Store1JS, |
| 729 'store2', Uint32x4Store2JS, |
| 730 'store3', Uint32x4Store3JS, |
| 711 ]); | 731 ]); |
| 712 | 732 |
| 713 utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [ | 733 utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [ |
| 714 'splat', Bool32x4Splat, | 734 'splat', Bool32x4Splat, |
| 715 'check', Bool32x4CheckJS, | 735 'check', Bool32x4CheckJS, |
| 716 'extractLane', Bool32x4ExtractLaneJS, | 736 'extractLane', Bool32x4ExtractLaneJS, |
| 717 'replaceLane', Bool32x4ReplaceLaneJS, | 737 'replaceLane', Bool32x4ReplaceLaneJS, |
| 718 'and', Bool32x4AndJS, | 738 'and', Bool32x4AndJS, |
| 719 'or', Bool32x4OrJS, | 739 'or', Bool32x4OrJS, |
| 720 'xor', Bool32x4XorJS, | 740 'xor', Bool32x4XorJS, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 'swizzle', Int16x8SwizzleJS, | 774 'swizzle', Int16x8SwizzleJS, |
| 755 'shuffle', Int16x8ShuffleJS, | 775 'shuffle', Int16x8ShuffleJS, |
| 756 'fromUint16x8', Int16x8FromUint16x8JS, | 776 'fromUint16x8', Int16x8FromUint16x8JS, |
| 757 'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS, | 777 'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS, |
| 758 'fromInt32x4Bits', Int16x8FromInt32x4BitsJS, | 778 'fromInt32x4Bits', Int16x8FromInt32x4BitsJS, |
| 759 'fromUint32x4Bits', Int16x8FromUint32x4BitsJS, | 779 'fromUint32x4Bits', Int16x8FromUint32x4BitsJS, |
| 760 'fromUint16x8Bits', Int16x8FromUint16x8BitsJS, | 780 'fromUint16x8Bits', Int16x8FromUint16x8BitsJS, |
| 761 'fromInt8x16Bits', Int16x8FromInt8x16BitsJS, | 781 'fromInt8x16Bits', Int16x8FromInt8x16BitsJS, |
| 762 'fromUint8x16Bits', Int16x8FromUint8x16BitsJS, | 782 'fromUint8x16Bits', Int16x8FromUint8x16BitsJS, |
| 763 'load', Int16x8LoadJS, | 783 'load', Int16x8LoadJS, |
| 784 'store', Int16x8StoreJS, |
| 764 ]); | 785 ]); |
| 765 | 786 |
| 766 utils.InstallFunctions(GlobalUint16x8, DONT_ENUM, [ | 787 utils.InstallFunctions(GlobalUint16x8, DONT_ENUM, [ |
| 767 'splat', Uint16x8Splat, | 788 'splat', Uint16x8Splat, |
| 768 'check', Uint16x8CheckJS, | 789 'check', Uint16x8CheckJS, |
| 769 'extractLane', Uint16x8ExtractLaneJS, | 790 'extractLane', Uint16x8ExtractLaneJS, |
| 770 'replaceLane', Uint16x8ReplaceLaneJS, | 791 'replaceLane', Uint16x8ReplaceLaneJS, |
| 771 'add', Uint16x8AddJS, | 792 'add', Uint16x8AddJS, |
| 772 'sub', Uint16x8SubJS, | 793 'sub', Uint16x8SubJS, |
| 773 'addSaturate', Uint16x8AddSaturateJS, | 794 'addSaturate', Uint16x8AddSaturateJS, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 794 'swizzle', Uint16x8SwizzleJS, | 815 'swizzle', Uint16x8SwizzleJS, |
| 795 'shuffle', Uint16x8ShuffleJS, | 816 'shuffle', Uint16x8ShuffleJS, |
| 796 'fromInt16x8', Uint16x8FromInt16x8JS, | 817 'fromInt16x8', Uint16x8FromInt16x8JS, |
| 797 'fromFloat32x4Bits', Uint16x8FromFloat32x4BitsJS, | 818 'fromFloat32x4Bits', Uint16x8FromFloat32x4BitsJS, |
| 798 'fromInt32x4Bits', Uint16x8FromInt32x4BitsJS, | 819 'fromInt32x4Bits', Uint16x8FromInt32x4BitsJS, |
| 799 'fromUint32x4Bits', Uint16x8FromUint32x4BitsJS, | 820 'fromUint32x4Bits', Uint16x8FromUint32x4BitsJS, |
| 800 'fromInt16x8Bits', Uint16x8FromInt16x8BitsJS, | 821 'fromInt16x8Bits', Uint16x8FromInt16x8BitsJS, |
| 801 'fromInt8x16Bits', Uint16x8FromInt8x16BitsJS, | 822 'fromInt8x16Bits', Uint16x8FromInt8x16BitsJS, |
| 802 'fromUint8x16Bits', Uint16x8FromUint8x16BitsJS, | 823 'fromUint8x16Bits', Uint16x8FromUint8x16BitsJS, |
| 803 'load', Uint16x8LoadJS, | 824 'load', Uint16x8LoadJS, |
| 825 'store', Uint16x8StoreJS, |
| 804 ]); | 826 ]); |
| 805 | 827 |
| 806 utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [ | 828 utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [ |
| 807 'splat', Bool16x8Splat, | 829 'splat', Bool16x8Splat, |
| 808 'check', Bool16x8CheckJS, | 830 'check', Bool16x8CheckJS, |
| 809 'extractLane', Bool16x8ExtractLaneJS, | 831 'extractLane', Bool16x8ExtractLaneJS, |
| 810 'replaceLane', Bool16x8ReplaceLaneJS, | 832 'replaceLane', Bool16x8ReplaceLaneJS, |
| 811 'and', Bool16x8AndJS, | 833 'and', Bool16x8AndJS, |
| 812 'or', Bool16x8OrJS, | 834 'or', Bool16x8OrJS, |
| 813 'xor', Bool16x8XorJS, | 835 'xor', Bool16x8XorJS, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 'swizzle', Int8x16SwizzleJS, | 869 'swizzle', Int8x16SwizzleJS, |
| 848 'shuffle', Int8x16ShuffleJS, | 870 'shuffle', Int8x16ShuffleJS, |
| 849 'fromUint8x16', Int8x16FromUint8x16JS, | 871 'fromUint8x16', Int8x16FromUint8x16JS, |
| 850 'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS, | 872 'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS, |
| 851 'fromInt32x4Bits', Int8x16FromInt32x4BitsJS, | 873 'fromInt32x4Bits', Int8x16FromInt32x4BitsJS, |
| 852 'fromUint32x4Bits', Int8x16FromUint32x4BitsJS, | 874 'fromUint32x4Bits', Int8x16FromUint32x4BitsJS, |
| 853 'fromInt16x8Bits', Int8x16FromInt16x8BitsJS, | 875 'fromInt16x8Bits', Int8x16FromInt16x8BitsJS, |
| 854 'fromUint16x8Bits', Int8x16FromUint16x8BitsJS, | 876 'fromUint16x8Bits', Int8x16FromUint16x8BitsJS, |
| 855 'fromUint8x16Bits', Int8x16FromUint8x16BitsJS, | 877 'fromUint8x16Bits', Int8x16FromUint8x16BitsJS, |
| 856 'load', Int8x16LoadJS, | 878 'load', Int8x16LoadJS, |
| 879 'store', Int8x16StoreJS, |
| 857 ]); | 880 ]); |
| 858 | 881 |
| 859 utils.InstallFunctions(GlobalUint8x16, DONT_ENUM, [ | 882 utils.InstallFunctions(GlobalUint8x16, DONT_ENUM, [ |
| 860 'splat', Uint8x16Splat, | 883 'splat', Uint8x16Splat, |
| 861 'check', Uint8x16CheckJS, | 884 'check', Uint8x16CheckJS, |
| 862 'extractLane', Uint8x16ExtractLaneJS, | 885 'extractLane', Uint8x16ExtractLaneJS, |
| 863 'replaceLane', Uint8x16ReplaceLaneJS, | 886 'replaceLane', Uint8x16ReplaceLaneJS, |
| 864 'add', Uint8x16AddJS, | 887 'add', Uint8x16AddJS, |
| 865 'sub', Uint8x16SubJS, | 888 'sub', Uint8x16SubJS, |
| 866 'addSaturate', Uint8x16AddSaturateJS, | 889 'addSaturate', Uint8x16AddSaturateJS, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 887 'swizzle', Uint8x16SwizzleJS, | 910 'swizzle', Uint8x16SwizzleJS, |
| 888 'shuffle', Uint8x16ShuffleJS, | 911 'shuffle', Uint8x16ShuffleJS, |
| 889 'fromInt8x16', Uint8x16FromInt8x16JS, | 912 'fromInt8x16', Uint8x16FromInt8x16JS, |
| 890 'fromFloat32x4Bits', Uint8x16FromFloat32x4BitsJS, | 913 'fromFloat32x4Bits', Uint8x16FromFloat32x4BitsJS, |
| 891 'fromInt32x4Bits', Uint8x16FromInt32x4BitsJS, | 914 'fromInt32x4Bits', Uint8x16FromInt32x4BitsJS, |
| 892 'fromUint32x4Bits', Uint8x16FromUint32x4BitsJS, | 915 'fromUint32x4Bits', Uint8x16FromUint32x4BitsJS, |
| 893 'fromInt16x8Bits', Uint8x16FromInt16x8BitsJS, | 916 'fromInt16x8Bits', Uint8x16FromInt16x8BitsJS, |
| 894 'fromUint16x8Bits', Uint8x16FromUint16x8BitsJS, | 917 'fromUint16x8Bits', Uint8x16FromUint16x8BitsJS, |
| 895 'fromInt8x16Bits', Uint8x16FromInt8x16BitsJS, | 918 'fromInt8x16Bits', Uint8x16FromInt8x16BitsJS, |
| 896 'load', Uint8x16LoadJS, | 919 'load', Uint8x16LoadJS, |
| 920 'store', Uint8x16StoreJS, |
| 897 ]); | 921 ]); |
| 898 | 922 |
| 899 utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [ | 923 utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [ |
| 900 'splat', Bool8x16Splat, | 924 'splat', Bool8x16Splat, |
| 901 'check', Bool8x16CheckJS, | 925 'check', Bool8x16CheckJS, |
| 902 'extractLane', Bool8x16ExtractLaneJS, | 926 'extractLane', Bool8x16ExtractLaneJS, |
| 903 'replaceLane', Bool8x16ReplaceLaneJS, | 927 'replaceLane', Bool8x16ReplaceLaneJS, |
| 904 'and', Bool8x16AndJS, | 928 'and', Bool8x16AndJS, |
| 905 'or', Bool8x16OrJS, | 929 'or', Bool8x16OrJS, |
| 906 'xor', Bool8x16XorJS, | 930 'xor', Bool8x16XorJS, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 918 to.Bool32x4ToString = Bool32x4ToString; | 942 to.Bool32x4ToString = Bool32x4ToString; |
| 919 to.Int16x8ToString = Int16x8ToString; | 943 to.Int16x8ToString = Int16x8ToString; |
| 920 to.Uint16x8ToString = Uint16x8ToString; | 944 to.Uint16x8ToString = Uint16x8ToString; |
| 921 to.Bool16x8ToString = Bool16x8ToString; | 945 to.Bool16x8ToString = Bool16x8ToString; |
| 922 to.Int8x16ToString = Int8x16ToString; | 946 to.Int8x16ToString = Int8x16ToString; |
| 923 to.Uint8x16ToString = Uint8x16ToString; | 947 to.Uint8x16ToString = Uint8x16ToString; |
| 924 to.Bool8x16ToString = Bool8x16ToString; | 948 to.Bool8x16ToString = Bool8x16ToString; |
| 925 }); | 949 }); |
| 926 | 950 |
| 927 }) | 951 }) |
| OLD | NEW |