| 835 | Operation:<br /> |
| 836 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 837 | UINT64 P = *VM; *VM = *VM ^ SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 838 | <h4>S_BUFFER_ATOMIC_ADD</h4> |
| 839 | <p>Opcode: 66 (0x42) only for GCN 1.4<br /> |
| 840 | Syntax: S_BUFFER_ATOMIC_ADD SDATA, SBASE(4), OFFSET<br /> |
| 841 | Description: Add SDATA to value from memory address, and store result to memory address. |
| 842 | If GLC flag is set then return previous value from memory address to SDATA, |
| 843 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 844 | Operation:<br /> |
| 845 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 846 | UINT32 P = *VM; *VM = *VM + SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 847 | <h4>S_BUFFER_ATOMIC_ADD_X2</h4> |
| 848 | <p>Opcode: 98 (0x62) only for GCN 1.4<br /> |
| 849 | Syntax: S_BUFFER_ATOMIC_ADD_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 850 | Description: Add 64-bit SDATA to 64-bit value from memory address, |
| 851 | and store result to memory address. |
| 852 | If GLC flag is set then return previous value from memory address to SDATA, |
| 853 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 854 | Operation:<br /> |
| 855 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 856 | UINT64 P = *VM; *VM = *VM + SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 857 | <h4>S_BUFFER_ATOMIC_AND</h4> |
| 858 | <p>Opcode: 72 (0x48) only for GCN 1.4<br /> |
| 859 | Syntax: S_BUFFER_ATOMIC_AND SDATA, SBASE(4), OFFSET<br /> |
| 860 | Description: Do bitwise AND on SDATA and value from memory address, |
| 861 | and store result to memory address. |
| 862 | If GLC flag is set then return previous value from memory address to SDATA, |
| 863 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 864 | Operation:<br /> |
| 865 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 866 | UINT32 P = *VM; *VM = *VM & SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 867 | <h4>S_BUFFER_ATOMIC_AND_X2</h4> |
| 868 | <p>Opcode: 104 (0x68) only for GCN 1.4<br /> |
| 869 | Syntax: S_BUFFER_ATOMIC_AND_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 870 | Description: Do bitwise AND on 64-bit SDATA and 64-bit value from memory address, |
| 871 | and store result to memory address. |
| 872 | If GLC flag is set then return previous value from memory address to SDATA, |
| 873 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 874 | Operation:<br /> |
| 875 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 876 | UINT64 P = *VM; *VM = *VM & SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 877 | <h4>S_BUFFER_ATOMIC_CMPSWAP</h4> |
| 878 | <p>Opcode: 65 (0x41) only for GCN 1.4<br /> |
| 879 | Syntax: S_BUFFER_ATOMIC_CMPSWAP SDATA(2), SBASE(4), OFFSET<br /> |
| 880 | Description: Store lower SDATA dword into memory address if previous value |
| 881 | from memory address is equal SDATA>>32, otherwise keep old value from memory address. |
| 882 | If GLC flag is set then return previous value from memory address to SDATA, |
| 883 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 884 | Operation:<br /> |
| 885 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 886 | UINT32 P = *VM; *VM = *VM = *VM==(SDATA>>32) ? SDATA&0xffffffff : *VM // atomic |
| 887 | SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 888 | <h4>S_BUFFER_ATOMIC_CMPSWAP_X2</h4> |
| 889 | <p>Opcode: 97 (0x61) only for GCN 1.4<br /> |
| 890 | Syntax: S_BUFFER_ATOMIC_CMPSWAP_X2 SDATA(4), SBASE(4), OFFSET<br /> |
| 891 | Description: Store lower SDATA quadword into memory address if previous value |
| 892 | from memory address is equal last SDATA quadword, |
| 893 | otherwise keep old value from memory address. |
| 894 | If GLC flag is set then return previous value from memory address to SDATA, |
| 895 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 896 | Operation:<br /> |
| 897 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 898 | UINT64 P = *VM; *VM = *VM = *VM==(SDATA[2:3]) ? SDATA[0:1] : *VM // atomic |
| 899 | SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 900 | <h4>S_BUFFER_ATOMIC_DEC</h4> |
| 901 | <p>Opcode: 76 (0x4c) only for GCN 1.4<br /> |
| 902 | Syntax: S_BUFFER_ATOMIC_DEC SDATA, SBASE(4), OFFSET<br /> |
| 903 | Description: Compare value from memory address and if less or equal than SDATA |
| 904 | and this value is not zero, then decrement value from memory address, |
| 905 | otherwise store SDATA to memory address. |
| 906 | If GLC flag is set then return previous value from memory address to SDATA, |
| 907 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 908 | Operation:<br /> |
| 909 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 910 | UINT32 P = *VM; *VM = (*VM <= VDATA && *VM!=0) ? *VM-1 : VDATA; // atomic |
| 911 | SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 912 | <h4>S_BUFFER_ATOMIC_DEC_X2</h4> |
| 913 | <p>Opcode: 108 (0x6c) only for GCN 1.4<br /> |
| 914 | Syntax: S_BUFFER_ATOMIC_DEC_X2 SDATA, SBASE(4), OFFSET<br /> |
| 915 | Description: Compare 64-bit value from memory address and if less or equal than |
| 916 | 64-bit SDATA and this value is not zero, then decrement value from memory address, |
| 917 | otherwise store SDATA to memory address. |
| 918 | If GLC flag is set then return previous value from memory address to SDATA, |
| 919 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 920 | Operation:<br /> |
| 921 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 922 | UINT64 P = *VM; *VM = (*VM <= VDATA && *VM!=0) ? *VM-1 : VDATA; // atomic |
| 923 | SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 924 | <h4>S_BUFFER_ATOMIC_INC</h4> |
| 925 | <p>Opcode: 75 (0x4b) only for GCN 1.4<br /> |
| 926 | Syntax: S_BUFFER_ATOMIC_INC SDATA, SBASE(4), OFFSET<br /> |
| 927 | Description: Compare value from memory address and if less than SDATA, |
| 928 | then increment value from memory address, otherwise store zero to memory address. |
| 929 | If GLC flag is set then return previous value from memory address to SDATA, |
| 930 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 931 | Operation:<br /> |
| 932 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 933 | UINT32 P = *VM; *VM = (*VM < SDATA) ? *VM+1 : 0; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 934 | <h4>S_BUFFER_ATOMIC_INC_X2</h4> |
| 935 | <p>Opcode: 107 (0x6b) only for GCN 1.4<br /> |
| 936 | Syntax: S_BUFFER_ATOMIC_INC_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 937 | Description: Compare 64-bit value from memory address and if less than 64-bit SDATA, |
| 938 | then increment value from memory address, otherwise store zero to memory address. |
| 939 | If GLC flag is set then return previous value from memory address to SDATA, |
| 940 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 941 | Operation:<br /> |
| 942 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 943 | UINT64 P = *VM; *VM = (*VM < SDATA) ? *VM+1 : 0; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 944 | <h4>S_BUFFER_ATOMIC_OR</h4> |
| 945 | <p>Opcode: 73 (0x49) only for GCN 1.4<br /> |
| 946 | Syntax: S_BUFFER_ATOMIC_OR SDATA, SBASE(4), OFFSET<br /> |
| 947 | Description: Do bitwise OR on SDATA and value from memory address, |
| 948 | and store result to memory address. |
| 949 | If GLC flag is set then return previous value from memory address to SDATA, |
| 950 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 951 | Operation:<br /> |
| 952 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 953 | UINT32 P = *VM; *VM = *VM | SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 954 | <h4>S_BUFFER_ATOMIC_OR_X2</h4> |
| 955 | <p>Opcode: 105 (0x69) only for GCN 1.4<br /> |
| 956 | Syntax: S_BUFFER_ATOMIC_OR_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 957 | Description: Do bitwise OR on 64-bit SDATA and 64-bit value from memory address, |
| 958 | and store result to memory address. |
| 959 | If GLC flag is set then return previous value from memory address to SDATA, |
| 960 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 961 | Operation:<br /> |
| 962 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 963 | UINT64 P = *VM; *VM = *VM | SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 964 | <h4>S_BUFFER_ATOMIC_SMAX</h4> |
| 965 | <p>Opcode: 72 (0x46) only for GCN 1.4<br /> |
| 966 | Syntax: S_BUFFER_ATOMIC_SMAX SDATA, SBASE(4), OFFSET<br /> |
| 967 | Description: Choose largest signed 32-bit value from SDATA and from memory address, |
| 968 | and store result to this memory address. |
| 969 | If GLC flag is set then return previous value from memory address to SDATA, |
| 970 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 971 | Operation:<br /> |
| 972 | <code>INT32* VM = (INT32*)((SMEM + (OFFSET & ~3)) |
| 973 | INT32 P = *VM; *VM = MAX(*VM, (INT32)SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 974 | <h4>S_BUFFER_ATOMIC_SMAX_X2</h4> |
| 975 | <p>Opcode: 102 (0x66) only for GCN 1.4<br /> |
| 976 | Syntax: S_BUFFER_ATOMIC_SMAX_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 977 | Description: Choose largest signed 64-bit value from SDATA and from memory address, |
| 978 | and store result to this memory address. |
| 979 | If GLC flag is set then return previous value from memory address to SDATA, |
| 980 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 981 | Operation:<br /> |
| 982 | <code>INT64* VM = (INT64*)((SMEM + (OFFSET & ~3)) |
| 983 | INT64 P = *VM; *VM = MAX(*VM, (INT64)SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 984 | <h4>S_BUFFER_ATOMIC_SMIN</h4> |
| 985 | <p>Opcode: 70 (0x44) only for GCN 1.4<br /> |
| 986 | Syntax: S_BUFFER_ATOMIC_SMIN SDATA, SBASE(4), OFFSET<br /> |
| 987 | Description: Choose smallest signed 32-bit value from SDATA and from memory address, |
| 988 | and store result to this memory address. |
| 989 | If GLC flag is set then return previous value from memory address to SDATA, |
| 990 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 991 | Operation:<br /> |
| 992 | <code>INT32* VM = (INT32*)((SMEM + (OFFSET & ~3)) |
| 993 | INT32 P = *VM; *VM = MIN(*VM, (INT32)SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 994 | <h4>S_BUFFER_ATOMIC_SMIN_X2</h4> |
| 995 | <p>Opcode: 100 (0x64) only for GCN 1.4<br /> |
| 996 | Syntax: S_BUFFER_ATOMIC_SMIN_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 997 | Description: Choose smallest signed 64-bit value from SDATA and from memory address, |
| 998 | and store result to this memory address. |
| 999 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1000 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1001 | Operation:<br /> |
| 1002 | <code>INT64* VM = (INT64*)((SMEM + (OFFSET & ~3)) |
| 1003 | INT64 P = *VM; *VM = MIN(*VM, (INT64)SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1004 | <h4>S_BUFFER_ATOMIC_SUB</h4> |
| 1005 | <p>Opcode: 69 (0x43) only for GCN 1.4<br /> |
| 1006 | Syntax: S_BUFFER_ATOMIC_SUB SDATA, SBASE(4), OFFSET<br /> |
| 1007 | Description: Subtract SDATA from value from memory address, |
| 1008 | and store result to memory address. |
| 1009 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1010 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1011 | Operation:<br /> |
| 1012 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 1013 | UINT32 P = *VM; *VM = *VM - SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1014 | <h4>S_BUFFER_ATOMIC_SUB_X2</h4> |
| 1015 | <p>Opcode: 99 (0x63) only for GCN 1.4<br /> |
| 1016 | Syntax: S_BUFFER_ATOMIC_SUB_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 1017 | Description: Subtract 64-bit SDATA from 64-bit value from memory address, |
| 1018 | and store result to memory address. |
| 1019 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1020 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1021 | Operation:<br /> |
| 1022 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 1023 | UINT64 P = *VM; *VM = *VM - SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1024 | <h4>S_BUFFER_ATOMIC_SWAP</h4> |
| 1025 | <p>Opcode: 64 (0x40) only for GCN 1.4<br /> |
| 1026 | Syntax: S_BUFFER_ATOMIC_SWAP SDATA, SBASE(4), OFFSET<br /> |
| 1027 | Description: Store SDATA into memory address. |
| 1028 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1029 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1030 | Operation:<br /> |
| 1031 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 1032 | UINT32 P = *VM; *VM = SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1033 | <h4>S_BUFFER_ATOMIC_SWAP_X2</h4> |
| 1034 | <p>Opcode: 96 (0x60) only for GCN 1.4<br /> |
| 1035 | Syntax: S_BUFFER_ATOMIC_SWAP_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 1036 | Description: Store 64-bit SDATA into memory address. |
| 1037 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1038 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1039 | Operation:<br /> |
| 1040 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 1041 | UINT64 P = *VM; *VM = SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1042 | <h4>S_BUFFER_ATOMIC_UMAX</h4> |
| 1043 | <p>Opcode: 71 (0x47) only for GCN 1.4<br /> |
| 1044 | Syntax: S_BUFFER_ATOMIC_UMAX SDATA, SBASE(4), OFFSET<br /> |
| 1045 | Description: Choose largest unsigned 32-bit value from SDATA and from memory address, |
| 1046 | and store result to this memory address. |
| 1047 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1048 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1049 | Operation:<br /> |
| 1050 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 1051 | UINT32 P = *VM; *VM = MAX(*VM, SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1052 | <h4>S_BUFFER_ATOMIC_UMAX_X2</h4> |
| 1053 | <p>Opcode: 103 (0x67) only for GCN 1.4<br /> |
| 1054 | Syntax: S_BUFFER_ATOMIC_UMAX_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 1055 | Description: Choose largest unsigned 64-bit value from SDATA and from memory address, |
| 1056 | and store result to this memory address. |
| 1057 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1058 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1059 | Operation:<br /> |
| 1060 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 1061 | UINT64 P = *VM; *VM = MAX(*VM, SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1062 | <h4>S_BUFFER_ATOMIC_UMIN</h4> |
| 1063 | <p>Opcode: 69 (0x45) only for GCN 1.4<br /> |
| 1064 | Syntax: S_BUFFER_ATOMIC_UMIN SDATA, SBASE(4), OFFSET<br /> |
| 1065 | Description: Choose smallest unsigned 32-bit value from SDATA and from memory address, |
| 1066 | and store result to this memory address. |
| 1067 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1068 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1069 | Operation:<br /> |
| 1070 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 1071 | UINT32 P = *VM; *VM = MIN(*VM, SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1072 | <h4>S_BUFFER_ATOMIC_UMIN_X2</h4> |
| 1073 | <p>Opcode: 101 (0x65) only for GCN 1.4<br /> |
| 1074 | Syntax: S_BUFFER_ATOMIC_UMIN_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 1075 | Description: Choose smallest unsigned 64-bit value from SDATA and from memory address, |
| 1076 | and store result to this memory address. |
| 1077 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1078 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1079 | Operation:<br /> |
| 1080 | <code>UINT64* VM = (UINT64*)((SMEM + (OFFSET & ~3)) |
| 1081 | UINT64 P = *VM; *VM = MIN(*VM, SDATA); SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1082 | <h4>S_BUFFER_ATOMIC_XOR</h4> |
| 1083 | <p>Opcode: 74 (0x4a) only for GCN 1.4<br /> |
| 1084 | Syntax: S_BUFFER_ATOMIC_XOR SDATA, SBASE(4), OFFSET<br /> |
| 1085 | Description: Do bitwise XOR on SDATA and value from memory address, |
| 1086 | and store result to memory address. |
| 1087 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1088 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |
| 1089 | Operation:<br /> |
| 1090 | <code>UINT32* VM = (UINT32*)((SMEM + (OFFSET & ~3)) |
| 1091 | UINT32 P = *VM; *VM = *VM ^ SDATA; SDATA = (GLC) ? P : SDATA // atomic</code></p> |
| 1092 | <h4>S_BUFFER_ATOMIC_XOR_X2</h4> |
| 1093 | <p>Opcode: 106 (0x6a) only for GCN 1.4<br /> |
| 1094 | Syntax: S_BUFFER_ATOMIC_XOR_X2 SDATA(2), SBASE(4), OFFSET<br /> |
| 1095 | Description: Do bitwise XOR on 64-bit SDATA and 64-bit value from memory address, |
| 1096 | and store result to memory address. |
| 1097 | If GLC flag is set then return previous value from memory address to SDATA, |
| 1098 | otherwise keep SDATA value. Operation is atomic. SBASE is buffer descriptor.<br /> |