static_inst.hh (3940:b87f85bb4275) | static_inst.hh (4181:6edaeff44647) |
---|---|
1/* 2 * Copyright (c) 2003-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; --- 425 unchanged lines hidden (view full) --- 434 static void dumpDecodeCacheStats(); 435 436 /// Decode a machine instruction. 437 /// @param mach_inst The binary instruction to decode. 438 /// @retval A pointer to the corresponding StaticInst object. 439 //This is defined as inline below. 440 static StaticInstPtr decode(ExtMachInst mach_inst); 441 | 1/* 2 * Copyright (c) 2003-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; --- 425 unchanged lines hidden (view full) --- 434 static void dumpDecodeCacheStats(); 435 436 /// Decode a machine instruction. 437 /// @param mach_inst The binary instruction to decode. 438 /// @retval A pointer to the corresponding StaticInst object. 439 //This is defined as inline below. 440 static StaticInstPtr decode(ExtMachInst mach_inst); 441 |
442 /// Return opcode of machine instruction 443 uint32_t getOpcode() { return bits(machInst, 31, 26);} 444 | |
445 /// Return name of machine instruction 446 std::string getName() { return mnemonic; } 447}; 448 449typedef RefCountingPtr<StaticInstBase> StaticInstBasePtr; 450 451/// Reference-counted pointer to a StaticInst object. 452/// This type should be used instead of "StaticInst *" so that --- 16 unchanged lines hidden (view full) --- 469 /// Copy constructor. 470 StaticInstPtr(const StaticInstPtr &r) 471 : RefCountingPtr<StaticInst>(r) 472 { 473 } 474 475 /// Construct directly from machine instruction. 476 /// Calls StaticInst::decode(). | 442 /// Return name of machine instruction 443 std::string getName() { return mnemonic; } 444}; 445 446typedef RefCountingPtr<StaticInstBase> StaticInstBasePtr; 447 448/// Reference-counted pointer to a StaticInst object. 449/// This type should be used instead of "StaticInst *" so that --- 16 unchanged lines hidden (view full) --- 466 /// Copy constructor. 467 StaticInstPtr(const StaticInstPtr &r) 468 : RefCountingPtr<StaticInst>(r) 469 { 470 } 471 472 /// Construct directly from machine instruction. 473 /// Calls StaticInst::decode(). |
477 StaticInstPtr(TheISA::ExtMachInst mach_inst) | 474 explicit StaticInstPtr(TheISA::ExtMachInst mach_inst) |
478 : RefCountingPtr<StaticInst>(StaticInst::decode(mach_inst)) 479 { 480 } 481 482 /// Convert to pointer to StaticInstBase class. 483 operator const StaticInstBasePtr() 484 { 485 return this->get(); --- 29 unchanged lines hidden --- | 475 : RefCountingPtr<StaticInst>(StaticInst::decode(mach_inst)) 476 { 477 } 478 479 /// Convert to pointer to StaticInstBase class. 480 operator const StaticInstBasePtr() 481 { 482 return this->get(); --- 29 unchanged lines hidden --- |