1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 298 unchanged lines hidden (view full) --- 307 bool diffGl = false; 308 bool diffAsi = false; 309 bool diffPil = false; 310 bool diffCwp = false; 311 bool diffCansave = false; 312 bool diffCanrestore = false; 313 bool diffOtherwin = false; 314 bool diffCleanwin = false; |
315 bool diffTlb = false; |
316 Addr m5Pc, lgnPc; 317 318 319 if(!staticInst->isMicroOp() || staticInst->isLastMicroOp()) { 320 while (!compared) { 321 if (shared_data->flags == OWN_M5) { 322 m5Pc = PC & TheISA::PAddrImplMask; 323 lgnPc = shared_data->pc & TheISA::PAddrImplMask; --- 67 unchanged lines hidden (view full) --- 391 if(shared_data->canrestore != 392 thread->readMiscReg(MISCREG_CANRESTORE)) 393 diffCanrestore = true; 394 if(shared_data->otherwin != thread->readMiscReg(MISCREG_OTHERWIN)) 395 diffOtherwin = true; 396 if(shared_data->cleanwin != thread->readMiscReg(MISCREG_CLEANWIN)) 397 diffCleanwin = true; 398 |
399 for (int i = 0; i < 64; i++) { 400 if (shared_data->itb[i] != thread->getITBPtr()->TteRead(i)) 401 diffTlb = true; 402 if (shared_data->dtb[i] != thread->getDTBPtr()->TteRead(i)) 403 diffTlb = true; 404 } 405 |
406 if ((diffPC || diffCC || diffInst || diffRegs || diffTpc || 407 diffTnpc || diffTstate || diffTt || diffHpstate || 408 diffHtstate || diffHtba || diffPstate || diffY || 409 diffCcr || diffTl || diffGl || diffAsi || diffPil || 410 diffCwp || diffCansave || diffCanrestore || |
411 diffOtherwin || diffCleanwin || diffTlb) |
412 && !((staticInst->machInst & 0xC1F80000) == 0x81D00000) |
413 && !(((staticInst->machInst & 0xC0000000) == 0xC0000000) 414 && shared_data->tl == thread->readMiscReg(MISCREG_TL) + 1) 415 ) { |
416 417 outs << "Differences found between M5 and Legion:"; 418 if (diffPC) 419 outs << " [PC]"; 420 if (diffCC) 421 outs << " [CC]"; 422 if (diffInst) 423 outs << " [Instruction]"; --- 32 unchanged lines hidden (view full) --- 456 if (diffCansave) 457 outs << " [Cansave]"; 458 if (diffCanrestore) 459 outs << " [Canrestore]"; 460 if (diffOtherwin) 461 outs << " [Otherwin]"; 462 if (diffCleanwin) 463 outs << " [Cleanwin]"; |
464 if (diffTlb) 465 outs << " [Tlb]"; |
466 outs << endl << endl; 467 468 outs << right << setfill(' ') << setw(15) 469 << "M5 PC: " << "0x"<< setw(16) << setfill('0') 470 << hex << m5Pc << endl; 471 outs << setfill(' ') << setw(15) 472 << "Legion PC: " << "0x"<< setw(16) << setfill('0') << hex 473 << lgnPc << endl << endl; --- 108 unchanged lines hidden (view full) --- 582 outs << " X "; 583 else 584 outs << " | "; 585 outs << "0x" << setw(16) << hex 586 << shared_data->intregs[y*8+x] 587 << endl;*/ 588 } 589 } |
590 printColumnLabels(outs); 591 char label[8]; 592 for (int x = 0; x < 64; x++) { 593 if (shared_data->itb[x] != ULL(0xFFFFFFFFFFFFFFFF) || 594 thread->getITBPtr()->TteRead(x) != ULL(0xFFFFFFFFFFFFFFFF)) { 595 sprintf(label, "I-TLB:%02d", x); 596 printRegPair(outs, label, thread->getITBPtr()->TteRead(x), shared_data->itb[x]); 597 } 598 } 599 for (int x = 0; x < 64; x++) { 600 if (shared_data->dtb[x] != ULL(0xFFFFFFFFFFFFFFFF) || 601 thread->getDTBPtr()->TteRead(x) != ULL(0xFFFFFFFFFFFFFFFF)) { 602 sprintf(label, "D-TLB:%02d", x); 603 printRegPair(outs, label, thread->getDTBPtr()->TteRead(x), shared_data->dtb[x]); 604 } 605 } |
606 thread->getITBPtr()->dumpAll(); 607 thread->getDTBPtr()->dumpAll(); 608 609 diffcount++; 610 if (diffcount > 2) 611 fatal("Differences found between Legion and M5\n"); 612 } 613 --- 116 unchanged lines hidden --- |