Revision 3391c818 target-sparc/op_helper.c
b/target-sparc/op_helper.c | ||
---|---|---|
1126 | 1126 |
} |
1127 | 1127 |
} |
1128 | 1128 |
#endif /* CONFIG_USER_ONLY */ |
1129 |
|
|
1130 |
void helper_ldf_asi(int asi, int size, int rd) |
|
1131 |
{ |
|
1132 |
target_ulong tmp_T0 = T0, tmp_T1 = T1; |
|
1133 |
unsigned int i; |
|
1134 |
|
|
1135 |
switch (asi) { |
|
1136 |
case 0xf0: // Block load primary |
|
1137 |
case 0xf1: // Block load secondary |
|
1138 |
case 0xf8: // Block load primary LE |
|
1139 |
case 0xf9: // Block load secondary LE |
|
1140 |
for (i = 0; i < 8; i++) { |
|
1141 |
helper_ld_asi(asi & 0x8f, 8, 0); |
|
1142 |
*((int64_t *)&DT0) = T1; |
|
1143 |
T0 += 8; |
|
1144 |
} |
|
1145 |
T0 = tmp_T0; |
|
1146 |
T1 = tmp_T1; |
|
1147 |
|
|
1148 |
return; |
|
1149 |
default: |
|
1150 |
break; |
|
1151 |
} |
|
1152 |
|
|
1153 |
helper_ld_asi(asi, size, 0); |
|
1154 |
switch(size) { |
|
1155 |
default: |
|
1156 |
case 4: |
|
1157 |
*((uint32_t *)&FT0) = T1; |
|
1158 |
break; |
|
1159 |
case 8: |
|
1160 |
*((int64_t *)&DT0) = T1; |
|
1161 |
break; |
|
1162 |
} |
|
1163 |
T1 = tmp_T1; |
|
1164 |
} |
|
1165 |
|
|
1166 |
void helper_stf_asi(int asi, int size, int rd) |
|
1167 |
{ |
|
1168 |
target_ulong tmp_T0 = T0, tmp_T1 = T1; |
|
1169 |
unsigned int i; |
|
1170 |
|
|
1171 |
switch (asi) { |
|
1172 |
case 0xf0: // Block store primary |
|
1173 |
case 0xf1: // Block store secondary |
|
1174 |
case 0xf8: // Block store primary LE |
|
1175 |
case 0xf9: // Block store secondary LE |
|
1176 |
for (i = 0; i < 8; i++) { |
|
1177 |
T1 = *((int64_t *)&DT0); |
|
1178 |
helper_st_asi(asi & 0x8f, 8); |
|
1179 |
T0 += 8; |
|
1180 |
} |
|
1181 |
T0 = tmp_T0; |
|
1182 |
T1 = tmp_T1; |
|
1183 |
|
|
1184 |
return; |
|
1185 |
default: |
|
1186 |
break; |
|
1187 |
} |
|
1188 |
|
|
1189 |
switch(size) { |
|
1190 |
default: |
|
1191 |
case 4: |
|
1192 |
T1 = *((uint32_t *)&FT0); |
|
1193 |
break; |
|
1194 |
case 8: |
|
1195 |
T1 = *((int64_t *)&DT0); |
|
1196 |
break; |
|
1197 |
} |
|
1198 |
helper_st_asi(asi, size); |
|
1199 |
T1 = tmp_T1; |
|
1200 |
} |
|
1201 |
|
|
1129 | 1202 |
#endif /* TARGET_SPARC64 */ |
1130 | 1203 |
|
1131 | 1204 |
#ifndef TARGET_SPARC64 |
Also available in: Unified diff