307 |
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction |
308 |
|
#endif |
309 |
|
#if (defined(ia64) || defined(__ia64__)) |
310 |
< |
#define SIGSEGV_FAULT_INSTRUCTION (((struct sigcontext *)scp)->sc_ip & ~0x3ULL) /* slot number is in bits 0 and 1 */ |
310 |
> |
#define SIGSEGV_CONTEXT_REGS ((struct sigcontext *)scp) |
311 |
> |
#define SIGSEGV_FAULT_INSTRUCTION (SIGSEGV_CONTEXT_REGS->sc_ip & ~0x3ULL) /* slot number is in bits 0 and 1 */ |
312 |
> |
#define SIGSEGV_REGISTER_FILE SIGSEGV_CONTEXT_REGS |
313 |
> |
#define SIGSEGV_SKIP_INSTRUCTION ia64_skip_instruction |
314 |
|
#endif |
315 |
|
#if (defined(powerpc) || defined(__powerpc__)) |
316 |
|
#include <sys/ucontext.h> |
1163 |
|
} |
1164 |
|
#endif |
1165 |
|
|
1166 |
+ |
// Decode and skip IA-64 instruction |
1167 |
+ |
#if defined(__ia64__) |
1168 |
+ |
#if defined(__linux__) |
1169 |
+ |
// We can directly patch the slot number |
1170 |
+ |
#define IA64_CAN_PATCH_IP_SLOT 1 |
1171 |
+ |
// Helper macros to access the machine context |
1172 |
+ |
#define IA64_CONTEXT_TYPE struct sigcontext * |
1173 |
+ |
#define IA64_CONTEXT scp |
1174 |
+ |
#define IA64_GET_IP() (IA64_CONTEXT->sc_ip) |
1175 |
+ |
#define IA64_SET_IP(V) (IA64_CONTEXT->sc_ip = (V)) |
1176 |
+ |
#define IA64_GET_PR(P) ((IA64_CONTEXT->sc_pr >> (P)) & 1) |
1177 |
+ |
#define IA64_GET_NAT(I) ((IA64_CONTEXT->sc_nat >> (I)) & 1) |
1178 |
+ |
#define IA64_SET_NAT(I,V) (IA64_CONTEXT->sc_nat= (IA64_CONTEXT->sc_nat & ~(1ul << (I))) | (((unsigned long)!!(V)) << (I))) |
1179 |
+ |
#define IA64_GET_GR(R) (IA64_CONTEXT->sc_gr[(R)]) |
1180 |
+ |
#define IA64_SET_GR(R,V) (IA64_CONTEXT->sc_gr[(R)] = (V)) |
1181 |
+ |
#endif |
1182 |
+ |
|
1183 |
+ |
// Instruction operations |
1184 |
+ |
enum { |
1185 |
+ |
IA64_INST_UNKNOWN = 0, |
1186 |
+ |
IA64_INST_LD1, // ld1 op0=[op1] |
1187 |
+ |
IA64_INST_LD1_UPDATE, // ld1 op0=[op1],op2 |
1188 |
+ |
IA64_INST_LD2, // ld2 op0=[op1] |
1189 |
+ |
IA64_INST_LD2_UPDATE, // ld2 op0=[op1],op2 |
1190 |
+ |
IA64_INST_LD4, // ld4 op0=[op1] |
1191 |
+ |
IA64_INST_LD4_UPDATE, // ld4 op0=[op1],op2 |
1192 |
+ |
IA64_INST_LD8, // ld8 op0=[op1] |
1193 |
+ |
IA64_INST_LD8_UPDATE, // ld8 op0=[op1],op2 |
1194 |
+ |
IA64_INST_ST1, // st1 [op0]=op1 |
1195 |
+ |
IA64_INST_ST1_UPDATE, // st1 [op0]=op1,op2 |
1196 |
+ |
IA64_INST_ST2, // st2 [op0]=op1 |
1197 |
+ |
IA64_INST_ST2_UPDATE, // st2 [op0]=op1,op2 |
1198 |
+ |
IA64_INST_ST4, // st4 [op0]=op1 |
1199 |
+ |
IA64_INST_ST4_UPDATE, // st4 [op0]=op1,op2 |
1200 |
+ |
IA64_INST_ST8, // st8 [op0]=op1 |
1201 |
+ |
IA64_INST_ST8_UPDATE, // st8 [op0]=op1,op2 |
1202 |
+ |
IA64_INST_ADD, // add op0=op1,op2,op3 |
1203 |
+ |
IA64_INST_SUB, // sub op0=op1,op2,op3 |
1204 |
+ |
IA64_INST_SHLADD, // shladd op0=op1,op3,op2 |
1205 |
+ |
IA64_INST_AND, // and op0=op1,op2 |
1206 |
+ |
IA64_INST_ANDCM, // andcm op0=op1,op2 |
1207 |
+ |
IA64_INST_OR, // or op0=op1,op2 |
1208 |
+ |
IA64_INST_XOR, // xor op0=op1,op2 |
1209 |
+ |
IA64_INST_SXT1, // sxt1 op0=op1 |
1210 |
+ |
IA64_INST_SXT2, // sxt2 op0=op1 |
1211 |
+ |
IA64_INST_SXT4, // sxt4 op0=op1 |
1212 |
+ |
IA64_INST_ZXT1, // zxt1 op0=op1 |
1213 |
+ |
IA64_INST_ZXT2, // zxt2 op0=op1 |
1214 |
+ |
IA64_INST_ZXT4, // zxt4 op0=op1 |
1215 |
+ |
IA64_INST_NOP // nop op0 |
1216 |
+ |
}; |
1217 |
+ |
|
1218 |
+ |
const int IA64_N_OPERANDS = 4; |
1219 |
+ |
|
1220 |
+ |
// Decoded operand type |
1221 |
+ |
struct ia64_operand_t { |
1222 |
+ |
unsigned char commit; // commit result of operation to register file? |
1223 |
+ |
unsigned char valid; // XXX: not really used, can be removed (debug) |
1224 |
+ |
signed char index; // index of GPR, or -1 if immediate value |
1225 |
+ |
unsigned char nat; // NaT state before operation |
1226 |
+ |
unsigned long value; // register contents or immediate value |
1227 |
+ |
}; |
1228 |
+ |
|
1229 |
+ |
// Decoded instruction type |
1230 |
+ |
struct ia64_instruction_t { |
1231 |
+ |
unsigned char mnemo; // operation to perform |
1232 |
+ |
unsigned char pred; // predicate register to check |
1233 |
+ |
unsigned char no_memory; // used to emulated main fault instruction |
1234 |
+ |
unsigned long inst; // the raw instruction bits (41-bit wide) |
1235 |
+ |
ia64_operand_t operands[IA64_N_OPERANDS]; |
1236 |
+ |
}; |
1237 |
+ |
|
1238 |
+ |
// Get immediate sign-bit |
1239 |
+ |
static inline int ia64_inst_get_sbit(unsigned long inst) |
1240 |
+ |
{ |
1241 |
+ |
return (inst >> 36) & 1; |
1242 |
+ |
} |
1243 |
+ |
|
1244 |
+ |
// Get 8-bit immediate value (A3, A8, I27, M30) |
1245 |
+ |
static inline unsigned long ia64_inst_get_imm8(unsigned long inst) |
1246 |
+ |
{ |
1247 |
+ |
unsigned long value = (inst >> 13) & 0x7ful; |
1248 |
+ |
if (ia64_inst_get_sbit(inst)) |
1249 |
+ |
value |= ~0x7ful; |
1250 |
+ |
return value; |
1251 |
+ |
} |
1252 |
+ |
|
1253 |
+ |
// Get 9-bit immediate value (M3) |
1254 |
+ |
static inline unsigned long ia64_inst_get_imm9b(unsigned long inst) |
1255 |
+ |
{ |
1256 |
+ |
unsigned long value = (((inst >> 27) & 1) << 7) | ((inst >> 13) & 0x7f); |
1257 |
+ |
if (ia64_inst_get_sbit(inst)) |
1258 |
+ |
value |= ~0xfful; |
1259 |
+ |
return value; |
1260 |
+ |
} |
1261 |
+ |
|
1262 |
+ |
// Get 9-bit immediate value (M5) |
1263 |
+ |
static inline unsigned long ia64_inst_get_imm9a(unsigned long inst) |
1264 |
+ |
{ |
1265 |
+ |
unsigned long value = (((inst >> 27) & 1) << 7) | ((inst >> 6) & 0x7f); |
1266 |
+ |
if (ia64_inst_get_sbit(inst)) |
1267 |
+ |
value |= ~0xfful; |
1268 |
+ |
return value; |
1269 |
+ |
} |
1270 |
+ |
|
1271 |
+ |
// Get 14-bit immediate value (A4) |
1272 |
+ |
static inline unsigned long ia64_inst_get_imm14(unsigned long inst) |
1273 |
+ |
{ |
1274 |
+ |
unsigned long value = (((inst >> 27) & 0x3f) << 7) | (inst & 0x7f); |
1275 |
+ |
if (ia64_inst_get_sbit(inst)) |
1276 |
+ |
value |= ~0x1fful; |
1277 |
+ |
return value; |
1278 |
+ |
} |
1279 |
+ |
|
1280 |
+ |
// Get 22-bit immediate value (A5) |
1281 |
+ |
static inline unsigned long ia64_inst_get_imm22(unsigned long inst) |
1282 |
+ |
{ |
1283 |
+ |
unsigned long value = ((((inst >> 22) & 0x1f) << 16) | |
1284 |
+ |
(((inst >> 27) & 0x1ff) << 7) | |
1285 |
+ |
(inst & 0x7f)); |
1286 |
+ |
if (ia64_inst_get_sbit(inst)) |
1287 |
+ |
value |= ~0x1ffffful; |
1288 |
+ |
return value; |
1289 |
+ |
} |
1290 |
+ |
|
1291 |
+ |
// Get 21-bit immediate value (I19) |
1292 |
+ |
static inline unsigned long ia64_inst_get_imm21(unsigned long inst) |
1293 |
+ |
{ |
1294 |
+ |
return (((inst >> 36) & 1) << 20) | ((inst >> 6) & 0xfffff); |
1295 |
+ |
} |
1296 |
+ |
|
1297 |
+ |
// Get 2-bit count value (A2) |
1298 |
+ |
static inline int ia64_inst_get_count2(unsigned long inst) |
1299 |
+ |
{ |
1300 |
+ |
return (inst >> 27) & 0x3; |
1301 |
+ |
} |
1302 |
+ |
|
1303 |
+ |
// Get bundle template |
1304 |
+ |
static inline unsigned int ia64_get_template(unsigned long raw_ip) |
1305 |
+ |
{ |
1306 |
+ |
unsigned long *ip = (unsigned long *)(raw_ip & ~3ul); |
1307 |
+ |
return ip[0] & 0x1f; |
1308 |
+ |
} |
1309 |
+ |
|
1310 |
+ |
// Get specified instruction in bundle |
1311 |
+ |
static unsigned long ia64_get_instruction(unsigned long raw_ip, int slot) |
1312 |
+ |
{ |
1313 |
+ |
unsigned long inst; |
1314 |
+ |
unsigned long *ip = (unsigned long *)(raw_ip & ~3ul); |
1315 |
+ |
#if DEBUG |
1316 |
+ |
printf("Bundle: %016lx%016lx\n", ip[1], ip[0]); |
1317 |
+ |
#endif |
1318 |
+ |
|
1319 |
+ |
switch (slot) { |
1320 |
+ |
case 0: |
1321 |
+ |
inst = (ip[0] >> 5) & 0x1fffffffffful; |
1322 |
+ |
break; |
1323 |
+ |
case 1: |
1324 |
+ |
inst = ((ip[1] & 0x7ffffful) << 18) | ((ip[0] >> 46) & 0x3fffful); |
1325 |
+ |
break; |
1326 |
+ |
case 2: |
1327 |
+ |
inst = (ip[1] >> 23) & 0x1fffffffffful; |
1328 |
+ |
break; |
1329 |
+ |
case 3: |
1330 |
+ |
fprintf(stderr, "ERROR: ia64_get_instruction(), invalid slot number %d\n", slot); |
1331 |
+ |
abort(); |
1332 |
+ |
break; |
1333 |
+ |
} |
1334 |
+ |
|
1335 |
+ |
#if DEBUG |
1336 |
+ |
printf(" Instruction %d: 0x%016lx\n", slot, inst); |
1337 |
+ |
#endif |
1338 |
+ |
return inst; |
1339 |
+ |
} |
1340 |
+ |
|
1341 |
+ |
// Decode group 0 instructions |
1342 |
+ |
static bool ia64_decode_instruction_0(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1343 |
+ |
{ |
1344 |
+ |
const int r1 = (inst->inst >> 6) & 0x7f; |
1345 |
+ |
const int r3 = (inst->inst >> 20) & 0x7f; |
1346 |
+ |
|
1347 |
+ |
const int x3 = (inst->inst >> 33) & 0x07; |
1348 |
+ |
const int x6 = (inst->inst >> 27) & 0x3f; |
1349 |
+ |
const int x2 = (inst->inst >> 31) & 0x03; |
1350 |
+ |
const int x4 = (inst->inst >> 27) & 0x0f; |
1351 |
+ |
|
1352 |
+ |
if (x3 == 0) { |
1353 |
+ |
switch (x6) { |
1354 |
+ |
case 0x01: // nop.i (I19) |
1355 |
+ |
inst->mnemo = IA64_INST_NOP; |
1356 |
+ |
inst->operands[0].valid = true; |
1357 |
+ |
inst->operands[0].index = -1; |
1358 |
+ |
inst->operands[0].value = ia64_inst_get_imm21(inst->inst); |
1359 |
+ |
return true; |
1360 |
+ |
case 0x14: // sxt1 (I29) |
1361 |
+ |
case 0x15: // sxt2 (I29) |
1362 |
+ |
case 0x16: // sxt4 (I29) |
1363 |
+ |
case 0x10: // zxt1 (I29) |
1364 |
+ |
case 0x11: // zxt2 (I29) |
1365 |
+ |
case 0x12: // zxt4 (I29) |
1366 |
+ |
switch (x6) { |
1367 |
+ |
case 0x14: inst->mnemo = IA64_INST_SXT1; break; |
1368 |
+ |
case 0x15: inst->mnemo = IA64_INST_SXT2; break; |
1369 |
+ |
case 0x16: inst->mnemo = IA64_INST_SXT4; break; |
1370 |
+ |
case 0x10: inst->mnemo = IA64_INST_ZXT1; break; |
1371 |
+ |
case 0x11: inst->mnemo = IA64_INST_ZXT2; break; |
1372 |
+ |
case 0x12: inst->mnemo = IA64_INST_ZXT4; break; |
1373 |
+ |
default: abort(); |
1374 |
+ |
} |
1375 |
+ |
inst->operands[0].valid = true; |
1376 |
+ |
inst->operands[0].index = r1; |
1377 |
+ |
inst->operands[1].valid = true; |
1378 |
+ |
inst->operands[1].index = r3; |
1379 |
+ |
inst->operands[1].value = IA64_GET_GR(r3); |
1380 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r3); |
1381 |
+ |
return true; |
1382 |
+ |
} |
1383 |
+ |
} |
1384 |
+ |
return false; |
1385 |
+ |
} |
1386 |
+ |
|
1387 |
+ |
// Decode group 4 instructions (load/store instructions) |
1388 |
+ |
static bool ia64_decode_instruction_4(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1389 |
+ |
{ |
1390 |
+ |
const int r1 = (inst->inst >> 6) & 0x7f; |
1391 |
+ |
const int r2 = (inst->inst >> 13) & 0x7f; |
1392 |
+ |
const int r3 = (inst->inst >> 20) & 0x7f; |
1393 |
+ |
|
1394 |
+ |
const int m = (inst->inst >> 36) & 1; |
1395 |
+ |
const int x = (inst->inst >> 27) & 1; |
1396 |
+ |
const int x6 = (inst->inst >> 30) & 0x3f; |
1397 |
+ |
|
1398 |
+ |
switch (x6) { |
1399 |
+ |
case 0x00: |
1400 |
+ |
case 0x01: |
1401 |
+ |
case 0x02: |
1402 |
+ |
case 0x03: |
1403 |
+ |
if (x == 0) { |
1404 |
+ |
inst->operands[0].valid = true; |
1405 |
+ |
inst->operands[0].index = r1; |
1406 |
+ |
inst->operands[1].valid = true; |
1407 |
+ |
inst->operands[1].index = r3; |
1408 |
+ |
inst->operands[1].value = IA64_GET_GR(r3); |
1409 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r3); |
1410 |
+ |
if (m == 0) { |
1411 |
+ |
switch (x6) { |
1412 |
+ |
case 0x00: inst->mnemo = IA64_INST_LD1; break; |
1413 |
+ |
case 0x01: inst->mnemo = IA64_INST_LD2; break; |
1414 |
+ |
case 0x02: inst->mnemo = IA64_INST_LD4; break; |
1415 |
+ |
case 0x03: inst->mnemo = IA64_INST_LD8; break; |
1416 |
+ |
} |
1417 |
+ |
} |
1418 |
+ |
else { |
1419 |
+ |
inst->operands[2].valid = true; |
1420 |
+ |
inst->operands[2].index = r2; |
1421 |
+ |
inst->operands[2].value = IA64_GET_GR(r2); |
1422 |
+ |
inst->operands[2].nat = IA64_GET_NAT(r2); |
1423 |
+ |
switch (x6) { |
1424 |
+ |
case 0x00: inst->mnemo = IA64_INST_LD1_UPDATE; break; |
1425 |
+ |
case 0x01: inst->mnemo = IA64_INST_LD2_UPDATE; break; |
1426 |
+ |
case 0x02: inst->mnemo = IA64_INST_LD4_UPDATE; break; |
1427 |
+ |
case 0x03: inst->mnemo = IA64_INST_LD8_UPDATE; break; |
1428 |
+ |
} |
1429 |
+ |
} |
1430 |
+ |
return true; |
1431 |
+ |
} |
1432 |
+ |
break; |
1433 |
+ |
case 0x30: |
1434 |
+ |
case 0x31: |
1435 |
+ |
case 0x32: |
1436 |
+ |
case 0x33: |
1437 |
+ |
if (m == 0 && x == 0) { |
1438 |
+ |
inst->operands[0].valid = true; |
1439 |
+ |
inst->operands[0].index = r3; |
1440 |
+ |
inst->operands[0].value = IA64_GET_GR(r3); |
1441 |
+ |
inst->operands[0].nat = IA64_GET_NAT(r3); |
1442 |
+ |
inst->operands[1].valid = true; |
1443 |
+ |
inst->operands[1].index = r2; |
1444 |
+ |
inst->operands[1].value = IA64_GET_GR(r2); |
1445 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r2); |
1446 |
+ |
switch (x6) { |
1447 |
+ |
case 0x30: inst->mnemo = IA64_INST_ST1; break; |
1448 |
+ |
case 0x31: inst->mnemo = IA64_INST_ST2; break; |
1449 |
+ |
case 0x32: inst->mnemo = IA64_INST_ST4; break; |
1450 |
+ |
case 0x33: inst->mnemo = IA64_INST_ST8; break; |
1451 |
+ |
} |
1452 |
+ |
return true; |
1453 |
+ |
} |
1454 |
+ |
break; |
1455 |
+ |
} |
1456 |
+ |
return false; |
1457 |
+ |
} |
1458 |
+ |
|
1459 |
+ |
// Decode group 5 instructions (load/store instructions) |
1460 |
+ |
static bool ia64_decode_instruction_5(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1461 |
+ |
{ |
1462 |
+ |
const int r1 = (inst->inst >> 6) & 0x7f; |
1463 |
+ |
const int r2 = (inst->inst >> 13) & 0x7f; |
1464 |
+ |
const int r3 = (inst->inst >> 20) & 0x7f; |
1465 |
+ |
|
1466 |
+ |
const int x6 = (inst->inst >> 30) & 0x3f; |
1467 |
+ |
|
1468 |
+ |
switch (x6) { |
1469 |
+ |
case 0x00: |
1470 |
+ |
case 0x01: |
1471 |
+ |
case 0x02: |
1472 |
+ |
case 0x03: |
1473 |
+ |
inst->operands[0].valid = true; |
1474 |
+ |
inst->operands[0].index = r1; |
1475 |
+ |
inst->operands[1].valid = true; |
1476 |
+ |
inst->operands[1].index = r3; |
1477 |
+ |
inst->operands[1].value = IA64_GET_GR(r3); |
1478 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r3); |
1479 |
+ |
inst->operands[2].valid = true; |
1480 |
+ |
inst->operands[2].index = -1; |
1481 |
+ |
inst->operands[2].value = ia64_inst_get_imm9b(inst->inst); |
1482 |
+ |
inst->operands[2].nat = 0; |
1483 |
+ |
switch (x6) { |
1484 |
+ |
case 0x00: inst->mnemo = IA64_INST_LD1_UPDATE; break; |
1485 |
+ |
case 0x01: inst->mnemo = IA64_INST_LD2_UPDATE; break; |
1486 |
+ |
case 0x02: inst->mnemo = IA64_INST_LD4_UPDATE; break; |
1487 |
+ |
case 0x03: inst->mnemo = IA64_INST_LD8_UPDATE; break; |
1488 |
+ |
} |
1489 |
+ |
return true; |
1490 |
+ |
case 0x30: |
1491 |
+ |
case 0x31: |
1492 |
+ |
case 0x32: |
1493 |
+ |
case 0x33: |
1494 |
+ |
inst->operands[0].valid = true; |
1495 |
+ |
inst->operands[0].index = r3; |
1496 |
+ |
inst->operands[0].value = IA64_GET_GR(r3); |
1497 |
+ |
inst->operands[0].nat = IA64_GET_NAT(r3); |
1498 |
+ |
inst->operands[1].valid = true; |
1499 |
+ |
inst->operands[1].index = r2; |
1500 |
+ |
inst->operands[1].value = IA64_GET_GR(r2); |
1501 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r2); |
1502 |
+ |
inst->operands[2].valid = true; |
1503 |
+ |
inst->operands[2].index = -1; |
1504 |
+ |
inst->operands[2].value = ia64_inst_get_imm9a(inst->inst); |
1505 |
+ |
inst->operands[2].nat = 0; |
1506 |
+ |
switch (x6) { |
1507 |
+ |
case 0x30: inst->mnemo = IA64_INST_ST1_UPDATE; break; |
1508 |
+ |
case 0x31: inst->mnemo = IA64_INST_ST2_UPDATE; break; |
1509 |
+ |
case 0x32: inst->mnemo = IA64_INST_ST4_UPDATE; break; |
1510 |
+ |
case 0x33: inst->mnemo = IA64_INST_ST8_UPDATE; break; |
1511 |
+ |
} |
1512 |
+ |
return true; |
1513 |
+ |
} |
1514 |
+ |
return false; |
1515 |
+ |
} |
1516 |
+ |
|
1517 |
+ |
// Decode group 8 instructions (ALU integer) |
1518 |
+ |
static bool ia64_decode_instruction_8(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1519 |
+ |
{ |
1520 |
+ |
const int r1 = (inst->inst >> 6) & 0x7f; |
1521 |
+ |
const int r2 = (inst->inst >> 13) & 0x7f; |
1522 |
+ |
const int r3 = (inst->inst >> 20) & 0x7f; |
1523 |
+ |
|
1524 |
+ |
const int x2a = (inst->inst >> 34) & 0x3; |
1525 |
+ |
const int x2b = (inst->inst >> 27) & 0x3; |
1526 |
+ |
const int x4 = (inst->inst >> 29) & 0xf; |
1527 |
+ |
const int ve = (inst->inst >> 33) & 0x1; |
1528 |
+ |
|
1529 |
+ |
// destination register (r1) is always valid in this group |
1530 |
+ |
inst->operands[0].valid = true; |
1531 |
+ |
inst->operands[0].index = r1; |
1532 |
+ |
|
1533 |
+ |
// source register (r3) is always valid in this group |
1534 |
+ |
inst->operands[2].valid = true; |
1535 |
+ |
inst->operands[2].index = r3; |
1536 |
+ |
inst->operands[2].value = IA64_GET_GR(r3); |
1537 |
+ |
inst->operands[2].nat = IA64_GET_NAT(r3); |
1538 |
+ |
|
1539 |
+ |
if (x2a == 0 && ve == 0) { |
1540 |
+ |
inst->operands[1].valid = true; |
1541 |
+ |
inst->operands[1].index = r2; |
1542 |
+ |
inst->operands[1].value = IA64_GET_GR(r2); |
1543 |
+ |
inst->operands[1].nat = IA64_GET_NAT(r2); |
1544 |
+ |
switch (x4) { |
1545 |
+ |
case 0x0: // add (A1) |
1546 |
+ |
inst->mnemo = IA64_INST_ADD; |
1547 |
+ |
inst->operands[3].valid = true; |
1548 |
+ |
inst->operands[3].index = -1; |
1549 |
+ |
inst->operands[3].value = x2b == 1; |
1550 |
+ |
return true; |
1551 |
+ |
case 0x1: // add (A1) |
1552 |
+ |
inst->mnemo = IA64_INST_SUB; |
1553 |
+ |
inst->operands[3].valid = true; |
1554 |
+ |
inst->operands[3].index = -1; |
1555 |
+ |
inst->operands[3].value = x2b == 0; |
1556 |
+ |
return true; |
1557 |
+ |
case 0x4: // shladd (A2) |
1558 |
+ |
inst->mnemo = IA64_INST_SHLADD; |
1559 |
+ |
inst->operands[3].valid = true; |
1560 |
+ |
inst->operands[3].index = -1; |
1561 |
+ |
inst->operands[3].value = ia64_inst_get_count2(inst->inst); |
1562 |
+ |
return true; |
1563 |
+ |
case 0x9: |
1564 |
+ |
if (x2b == 1) { |
1565 |
+ |
inst->mnemo = IA64_INST_SUB; |
1566 |
+ |
inst->operands[1].index = -1; |
1567 |
+ |
inst->operands[1].value = ia64_inst_get_imm8(inst->inst); |
1568 |
+ |
inst->operands[1].nat = 0; |
1569 |
+ |
return true; |
1570 |
+ |
} |
1571 |
+ |
break; |
1572 |
+ |
case 0xb: |
1573 |
+ |
inst->operands[1].index = -1; |
1574 |
+ |
inst->operands[1].value = ia64_inst_get_imm8(inst->inst); |
1575 |
+ |
inst->operands[1].nat = 0; |
1576 |
+ |
// fall-through |
1577 |
+ |
case 0x3: |
1578 |
+ |
switch (x2b) { |
1579 |
+ |
case 0: inst->mnemo = IA64_INST_AND; break; |
1580 |
+ |
case 1: inst->mnemo = IA64_INST_ANDCM; break; |
1581 |
+ |
case 2: inst->mnemo = IA64_INST_OR; break; |
1582 |
+ |
case 3: inst->mnemo = IA64_INST_XOR; break; |
1583 |
+ |
} |
1584 |
+ |
return true; |
1585 |
+ |
} |
1586 |
+ |
} |
1587 |
+ |
return false; |
1588 |
+ |
} |
1589 |
+ |
|
1590 |
+ |
// Decode instruction |
1591 |
+ |
static bool ia64_decode_instruction(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1592 |
+ |
{ |
1593 |
+ |
const int major = (inst->inst >> 37) & 0xf; |
1594 |
+ |
|
1595 |
+ |
inst->mnemo = IA64_INST_UNKNOWN; |
1596 |
+ |
inst->pred = inst->inst & 0x3f; |
1597 |
+ |
memset(&inst->operands[0], 0, sizeof(inst->operands)); |
1598 |
+ |
|
1599 |
+ |
switch (major) { |
1600 |
+ |
case 0x0: return ia64_decode_instruction_0(inst, IA64_CONTEXT); |
1601 |
+ |
case 0x4: return ia64_decode_instruction_4(inst, IA64_CONTEXT); |
1602 |
+ |
case 0x5: return ia64_decode_instruction_5(inst, IA64_CONTEXT); |
1603 |
+ |
case 0x8: return ia64_decode_instruction_8(inst, IA64_CONTEXT); |
1604 |
+ |
} |
1605 |
+ |
return false; |
1606 |
+ |
} |
1607 |
+ |
|
1608 |
+ |
static bool ia64_emulate_instruction(ia64_instruction_t *inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1609 |
+ |
{ |
1610 |
+ |
// XXX: handle Register NaT Consumption fault? |
1611 |
+ |
// XXX: this simple emulator assumes instructions in a bundle |
1612 |
+ |
// don't depend on effects of other instructions in the same |
1613 |
+ |
// bundle. It probably would be simpler to JIT-generate code to be |
1614 |
+ |
// executed natively but probably more costly (inject/extract CPU state) |
1615 |
+ |
if (inst->mnemo == IA64_INST_UNKNOWN) |
1616 |
+ |
return false; |
1617 |
+ |
if (inst->pred && !IA64_GET_PR(inst->pred)) |
1618 |
+ |
return true; |
1619 |
+ |
|
1620 |
+ |
unsigned char nat, nat2; |
1621 |
+ |
unsigned long dst, dst2, src1, src2, src3; |
1622 |
+ |
|
1623 |
+ |
switch (inst->mnemo) { |
1624 |
+ |
case IA64_INST_NOP: |
1625 |
+ |
break; |
1626 |
+ |
case IA64_INST_ADD: |
1627 |
+ |
case IA64_INST_SUB: |
1628 |
+ |
case IA64_INST_SHLADD: |
1629 |
+ |
src3 = inst->operands[3].value; |
1630 |
+ |
// fall-through |
1631 |
+ |
case IA64_INST_AND: |
1632 |
+ |
case IA64_INST_ANDCM: |
1633 |
+ |
case IA64_INST_OR: |
1634 |
+ |
case IA64_INST_XOR: |
1635 |
+ |
src1 = inst->operands[1].value; |
1636 |
+ |
src2 = inst->operands[2].value; |
1637 |
+ |
switch (inst->mnemo) { |
1638 |
+ |
case IA64_INST_ADD: dst = src1 + src2 + src3; break; |
1639 |
+ |
case IA64_INST_SUB: dst = src1 - src2 - src3; break; |
1640 |
+ |
case IA64_INST_SHLADD: dst = (src1 << src3) + src2; break; |
1641 |
+ |
case IA64_INST_AND: dst = src1 & src2; break; |
1642 |
+ |
case IA64_INST_ANDCM: dst = src1 &~ src2; break; |
1643 |
+ |
case IA64_INST_OR: dst = src1 | src2; break; |
1644 |
+ |
case IA64_INST_XOR: dst = src1 ^ src2; break; |
1645 |
+ |
} |
1646 |
+ |
inst->operands[0].commit = true; |
1647 |
+ |
inst->operands[0].value = dst; |
1648 |
+ |
inst->operands[0].nat = inst->operands[1].nat | inst->operands[2].nat; |
1649 |
+ |
break; |
1650 |
+ |
case IA64_INST_SXT1: |
1651 |
+ |
case IA64_INST_SXT2: |
1652 |
+ |
case IA64_INST_SXT4: |
1653 |
+ |
case IA64_INST_ZXT1: |
1654 |
+ |
case IA64_INST_ZXT2: |
1655 |
+ |
case IA64_INST_ZXT4: |
1656 |
+ |
src1 = inst->operands[1].value; |
1657 |
+ |
switch (inst->mnemo) { |
1658 |
+ |
case IA64_INST_SXT1: dst = (signed long)(signed char)src1; break; |
1659 |
+ |
case IA64_INST_SXT2: dst = (signed long)(signed short)src1; break; |
1660 |
+ |
case IA64_INST_SXT4: dst = (signed long)(signed int)src1; break; |
1661 |
+ |
case IA64_INST_ZXT1: dst = (unsigned char)src1; break; |
1662 |
+ |
case IA64_INST_ZXT2: dst = (unsigned short)src1; break; |
1663 |
+ |
case IA64_INST_ZXT4: dst = (unsigned int)src1; break; |
1664 |
+ |
} |
1665 |
+ |
inst->operands[0].commit = true; |
1666 |
+ |
inst->operands[0].value = dst; |
1667 |
+ |
inst->operands[0].nat = inst->operands[1].nat; |
1668 |
+ |
break; |
1669 |
+ |
case IA64_INST_LD1_UPDATE: |
1670 |
+ |
case IA64_INST_LD2_UPDATE: |
1671 |
+ |
case IA64_INST_LD4_UPDATE: |
1672 |
+ |
case IA64_INST_LD8_UPDATE: |
1673 |
+ |
inst->operands[1].commit = true; |
1674 |
+ |
dst2 = inst->operands[1].value + inst->operands[2].value; |
1675 |
+ |
nat2 = inst->operands[2].nat ? inst->operands[2].nat : 0; |
1676 |
+ |
// fall-through |
1677 |
+ |
case IA64_INST_LD1: |
1678 |
+ |
case IA64_INST_LD2: |
1679 |
+ |
case IA64_INST_LD4: |
1680 |
+ |
case IA64_INST_LD8: |
1681 |
+ |
src1 = inst->operands[1].value; |
1682 |
+ |
if (inst->no_memory) |
1683 |
+ |
dst = 0; |
1684 |
+ |
else { |
1685 |
+ |
switch (inst->mnemo) { |
1686 |
+ |
case IA64_INST_LD1: case IA64_INST_LD1_UPDATE: dst = *((unsigned char *)src1); break; |
1687 |
+ |
case IA64_INST_LD2: case IA64_INST_LD2_UPDATE: dst = *((unsigned short *)src1); break; |
1688 |
+ |
case IA64_INST_LD4: case IA64_INST_LD4_UPDATE: dst = *((unsigned int *)src1); break; |
1689 |
+ |
case IA64_INST_LD8: case IA64_INST_LD8_UPDATE: dst = *((unsigned long *)src1); break; |
1690 |
+ |
} |
1691 |
+ |
} |
1692 |
+ |
inst->operands[0].commit = true; |
1693 |
+ |
inst->operands[0].value = dst; |
1694 |
+ |
inst->operands[0].nat = 0; |
1695 |
+ |
inst->operands[1].value = dst2; |
1696 |
+ |
inst->operands[1].nat = nat2; |
1697 |
+ |
break; |
1698 |
+ |
case IA64_INST_ST1_UPDATE: |
1699 |
+ |
case IA64_INST_ST2_UPDATE: |
1700 |
+ |
case IA64_INST_ST4_UPDATE: |
1701 |
+ |
case IA64_INST_ST8_UPDATE: |
1702 |
+ |
inst->operands[0].commit = 0; |
1703 |
+ |
dst2 = inst->operands[0].value + inst->operands[2].value; |
1704 |
+ |
nat2 = inst->operands[2].nat ? inst->operands[2].nat : 0; |
1705 |
+ |
// fall-through |
1706 |
+ |
case IA64_INST_ST1: |
1707 |
+ |
case IA64_INST_ST2: |
1708 |
+ |
case IA64_INST_ST4: |
1709 |
+ |
case IA64_INST_ST8: |
1710 |
+ |
dst = inst->operands[0].value; |
1711 |
+ |
src1 = inst->operands[1].value; |
1712 |
+ |
if (!inst->no_memory) { |
1713 |
+ |
switch (inst->mnemo) { |
1714 |
+ |
case IA64_INST_ST1: case IA64_INST_ST1_UPDATE: *((unsigned char *)dst) = src1; break; |
1715 |
+ |
case IA64_INST_ST2: case IA64_INST_ST2_UPDATE: *((unsigned short *)dst) = src1; break; |
1716 |
+ |
case IA64_INST_ST4: case IA64_INST_ST4_UPDATE: *((unsigned int *)dst) = src1; break; |
1717 |
+ |
case IA64_INST_ST8: case IA64_INST_ST8_UPDATE: *((unsigned long *)dst) = src1; break; |
1718 |
+ |
} |
1719 |
+ |
} |
1720 |
+ |
inst->operands[0].value = dst2; |
1721 |
+ |
inst->operands[0].nat = nat2; |
1722 |
+ |
break; |
1723 |
+ |
default: |
1724 |
+ |
return false; |
1725 |
+ |
} |
1726 |
+ |
|
1727 |
+ |
for (int i = 0; i < IA64_N_OPERANDS; i++) { |
1728 |
+ |
ia64_operand_t const & op = inst->operands[i]; |
1729 |
+ |
if (!op.commit) |
1730 |
+ |
continue; |
1731 |
+ |
if (op.index == -1) |
1732 |
+ |
return false; // XXX: internal error |
1733 |
+ |
IA64_SET_GR(op.index, op.value); |
1734 |
+ |
IA64_SET_NAT(op.index, op.nat); |
1735 |
+ |
} |
1736 |
+ |
return true; |
1737 |
+ |
} |
1738 |
+ |
|
1739 |
+ |
static bool ia64_emulate_instruction(unsigned long raw_inst, IA64_CONTEXT_TYPE IA64_CONTEXT) |
1740 |
+ |
{ |
1741 |
+ |
ia64_instruction_t inst; |
1742 |
+ |
memset(&inst, 0, sizeof(inst)); |
1743 |
+ |
inst.inst = raw_inst; |
1744 |
+ |
if (!ia64_decode_instruction(&inst, IA64_CONTEXT)) |
1745 |
+ |
return false; |
1746 |
+ |
return ia64_emulate_instruction(&inst, IA64_CONTEXT); |
1747 |
+ |
} |
1748 |
+ |
|
1749 |
+ |
static bool ia64_skip_instruction(IA64_CONTEXT_TYPE IA64_CONTEXT) |
1750 |
+ |
{ |
1751 |
+ |
unsigned long ip = IA64_GET_IP(); |
1752 |
+ |
#if DEBUG |
1753 |
+ |
printf("IP: 0x%016lx\n", ip); |
1754 |
+ |
#if 0 |
1755 |
+ |
printf(" Template 0x%02x\n", ia64_get_template(ip)); |
1756 |
+ |
ia64_get_instruction(ip, 0); |
1757 |
+ |
ia64_get_instruction(ip, 1); |
1758 |
+ |
ia64_get_instruction(ip, 2); |
1759 |
+ |
#endif |
1760 |
+ |
#endif |
1761 |
+ |
|
1762 |
+ |
// Select which decode switch to use |
1763 |
+ |
ia64_instruction_t inst; |
1764 |
+ |
inst.inst = ia64_get_instruction(ip, ip & 3); |
1765 |
+ |
if (!ia64_decode_instruction(&inst, IA64_CONTEXT)) { |
1766 |
+ |
fprintf(stderr, "ERROR: ia64_skip_instruction(): could not decode instruction\n"); |
1767 |
+ |
return false; |
1768 |
+ |
} |
1769 |
+ |
|
1770 |
+ |
transfer_type_t transfer_type = SIGSEGV_TRANSFER_UNKNOWN; |
1771 |
+ |
transfer_size_t transfer_size = SIZE_UNKNOWN; |
1772 |
+ |
|
1773 |
+ |
switch (inst.mnemo) { |
1774 |
+ |
case IA64_INST_LD1: |
1775 |
+ |
case IA64_INST_LD2: |
1776 |
+ |
case IA64_INST_LD4: |
1777 |
+ |
case IA64_INST_LD8: |
1778 |
+ |
case IA64_INST_LD1_UPDATE: |
1779 |
+ |
case IA64_INST_LD2_UPDATE: |
1780 |
+ |
case IA64_INST_LD4_UPDATE: |
1781 |
+ |
case IA64_INST_LD8_UPDATE: |
1782 |
+ |
transfer_type = SIGSEGV_TRANSFER_LOAD; |
1783 |
+ |
break; |
1784 |
+ |
case IA64_INST_ST1: |
1785 |
+ |
case IA64_INST_ST2: |
1786 |
+ |
case IA64_INST_ST4: |
1787 |
+ |
case IA64_INST_ST8: |
1788 |
+ |
case IA64_INST_ST1_UPDATE: |
1789 |
+ |
case IA64_INST_ST2_UPDATE: |
1790 |
+ |
case IA64_INST_ST4_UPDATE: |
1791 |
+ |
case IA64_INST_ST8_UPDATE: |
1792 |
+ |
transfer_type = SIGSEGV_TRANSFER_STORE; |
1793 |
+ |
break; |
1794 |
+ |
} |
1795 |
+ |
|
1796 |
+ |
if (transfer_type == SIGSEGV_TRANSFER_UNKNOWN) { |
1797 |
+ |
// Unknown machine code, let it crash. Then patch the decoder |
1798 |
+ |
fprintf(stderr, "ERROR: ia64_skip_instruction(): not a load/store instruction\n"); |
1799 |
+ |
return false; |
1800 |
+ |
} |
1801 |
+ |
|
1802 |
+ |
switch (inst.mnemo) { |
1803 |
+ |
case IA64_INST_LD1: |
1804 |
+ |
case IA64_INST_LD1_UPDATE: |
1805 |
+ |
case IA64_INST_ST1: |
1806 |
+ |
case IA64_INST_ST1_UPDATE: |
1807 |
+ |
transfer_size = SIZE_BYTE; |
1808 |
+ |
break; |
1809 |
+ |
case IA64_INST_LD2: |
1810 |
+ |
case IA64_INST_LD2_UPDATE: |
1811 |
+ |
case IA64_INST_ST2: |
1812 |
+ |
case IA64_INST_ST2_UPDATE: |
1813 |
+ |
transfer_size = SIZE_WORD; |
1814 |
+ |
break; |
1815 |
+ |
case IA64_INST_LD4: |
1816 |
+ |
case IA64_INST_LD4_UPDATE: |
1817 |
+ |
case IA64_INST_ST4: |
1818 |
+ |
case IA64_INST_ST4_UPDATE: |
1819 |
+ |
transfer_size = SIZE_LONG; |
1820 |
+ |
break; |
1821 |
+ |
case IA64_INST_LD8: |
1822 |
+ |
case IA64_INST_LD8_UPDATE: |
1823 |
+ |
case IA64_INST_ST8: |
1824 |
+ |
case IA64_INST_ST8_UPDATE: |
1825 |
+ |
transfer_size = SIZE_QUAD; |
1826 |
+ |
break; |
1827 |
+ |
} |
1828 |
+ |
|
1829 |
+ |
if (transfer_size == SIZE_UNKNOWN) { |
1830 |
+ |
// Unknown machine code, let it crash. Then patch the decoder |
1831 |
+ |
fprintf(stderr, "ERROR: ia64_skip_instruction(): unknown transfer size\n"); |
1832 |
+ |
return false; |
1833 |
+ |
} |
1834 |
+ |
|
1835 |
+ |
inst.no_memory = true; |
1836 |
+ |
if (!ia64_emulate_instruction(&inst, IA64_CONTEXT)) { |
1837 |
+ |
fprintf(stderr, "ERROR: ia64_skip_instruction(): could not emulate fault instruction\n"); |
1838 |
+ |
return false; |
1839 |
+ |
} |
1840 |
+ |
|
1841 |
+ |
int slot = ip & 3; |
1842 |
+ |
bool emulate_next = false; |
1843 |
+ |
switch (slot) { |
1844 |
+ |
case 0: |
1845 |
+ |
switch (ia64_get_template(ip)) { |
1846 |
+ |
case 0x2: // MI;I |
1847 |
+ |
case 0x3: // MI;I; |
1848 |
+ |
emulate_next = true; |
1849 |
+ |
slot = 2; |
1850 |
+ |
break; |
1851 |
+ |
case 0xa: // M;MI |
1852 |
+ |
case 0xb: // M;MI; |
1853 |
+ |
emulate_next = true; |
1854 |
+ |
slot = 1; |
1855 |
+ |
break; |
1856 |
+ |
} |
1857 |
+ |
break; |
1858 |
+ |
} |
1859 |
+ |
if (emulate_next && !IA64_CAN_PATCH_IP_SLOT) { |
1860 |
+ |
while (slot < 3) { |
1861 |
+ |
if (!ia64_emulate_instruction(ia64_get_instruction(ip, slot), IA64_CONTEXT)) { |
1862 |
+ |
fprintf(stderr, "ERROR: ia64_skip_instruction(): could not emulate instruction\n"); |
1863 |
+ |
return false; |
1864 |
+ |
} |
1865 |
+ |
++slot; |
1866 |
+ |
} |
1867 |
+ |
} |
1868 |
+ |
|
1869 |
+ |
#if IA64_CAN_PATCH_IP_SLOT |
1870 |
+ |
if ((slot = ip & 3) < 2) |
1871 |
+ |
IA64_SET_IP((ip & ~3ul) + (slot + 1)); |
1872 |
+ |
else |
1873 |
+ |
#endif |
1874 |
+ |
IA64_SET_IP((ip & ~3ul) + 16); |
1875 |
+ |
#if DEBUG |
1876 |
+ |
printf("IP: 0x%016lx\n", IA64_GET_IP()); |
1877 |
+ |
#endif |
1878 |
+ |
return true; |
1879 |
+ |
} |
1880 |
+ |
#endif |
1881 |
+ |
|
1882 |
|
// Decode and skip PPC instruction |
1883 |
|
#if (defined(powerpc) || defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)) |
1884 |
|
static bool powerpc_skip_instruction(unsigned long * nip_p, unsigned long * regs) |
3108 |
|
|
3109 |
|
if (!sigsegv_install_handler(sigsegv_test_handler)) |
3110 |
|
return 4; |
3111 |
< |
|
3111 |
> |
|
3112 |
|
#ifdef __GNUC__ |
3113 |
|
b_region = &&L_b_region1; |
3114 |
|
e_region = &&L_e_region1; |
3115 |
|
#endif |
3116 |
< |
L_b_region1: |
3117 |
< |
page[REF_INDEX] = REF_VALUE; |
3118 |
< |
if (page[REF_INDEX] != REF_VALUE) |
3119 |
< |
exit(20); |
3120 |
< |
page[REF_INDEX] = REF_VALUE; |
3121 |
< |
BARRIER(); |
3122 |
< |
L_e_region1: |
3116 |
> |
/* This is a really awful hack but otherwise gcc is smart enough |
3117 |
> |
* (or bug'ous enough?) to optimize the labels and place them |
3118 |
> |
* e.g. at the "main" entry point, which is wrong. |
3119 |
> |
*/ |
3120 |
> |
volatile int label_hack = 1; |
3121 |
> |
switch (label_hack) { |
3122 |
> |
case 1: |
3123 |
> |
L_b_region1: |
3124 |
> |
page[REF_INDEX] = REF_VALUE; |
3125 |
> |
if (page[REF_INDEX] != REF_VALUE) |
3126 |
> |
exit(20); |
3127 |
> |
page[REF_INDEX] = REF_VALUE; |
3128 |
> |
BARRIER(); |
3129 |
> |
// fall-through |
3130 |
> |
case 2: |
3131 |
> |
L_e_region1: |
3132 |
> |
BARRIER(); |
3133 |
> |
break; |
3134 |
> |
} |
3135 |
|
|
3136 |
|
if (handler_called != 1) |
3137 |
|
return 5; |
3162 |
|
b_region = &&L_b_region2; |
3163 |
|
e_region = &&L_e_region2; |
3164 |
|
#endif |
3165 |
< |
L_b_region2: |
3166 |
< |
TEST_SKIP_INSTRUCTION(unsigned char); |
3167 |
< |
TEST_SKIP_INSTRUCTION(unsigned short); |
3168 |
< |
TEST_SKIP_INSTRUCTION(unsigned int); |
3169 |
< |
TEST_SKIP_INSTRUCTION(unsigned long); |
3170 |
< |
TEST_SKIP_INSTRUCTION(signed char); |
3171 |
< |
TEST_SKIP_INSTRUCTION(signed short); |
3172 |
< |
TEST_SKIP_INSTRUCTION(signed int); |
3173 |
< |
TEST_SKIP_INSTRUCTION(signed long); |
3174 |
< |
BARRIER(); |
3175 |
< |
L_e_region2: |
3176 |
< |
|
3165 |
> |
switch (label_hack) { |
3166 |
> |
case 1: |
3167 |
> |
L_b_region2: |
3168 |
> |
TEST_SKIP_INSTRUCTION(unsigned char); |
3169 |
> |
TEST_SKIP_INSTRUCTION(unsigned short); |
3170 |
> |
TEST_SKIP_INSTRUCTION(unsigned int); |
3171 |
> |
TEST_SKIP_INSTRUCTION(unsigned long); |
3172 |
> |
TEST_SKIP_INSTRUCTION(signed char); |
3173 |
> |
TEST_SKIP_INSTRUCTION(signed short); |
3174 |
> |
TEST_SKIP_INSTRUCTION(signed int); |
3175 |
> |
TEST_SKIP_INSTRUCTION(signed long); |
3176 |
> |
BARRIER(); |
3177 |
> |
// fall-through |
3178 |
> |
case 2: |
3179 |
> |
L_e_region2: |
3180 |
> |
BARRIER(); |
3181 |
> |
break; |
3182 |
> |
} |
3183 |
|
if (!arch_insn_skipper_tests()) |
3184 |
|
return 20; |
3185 |
|
#endif |