main.isa (12614:0bc465e1f5fb) | main.isa (12616:4b463b4dc098) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 218 unchanged lines hidden (view full) --- 227 : StaticInst(mnem, _machInst, __opClass) 228 { 229 } 230 231 /// Print a register name for disassembly given the unique 232 /// dependence tag number (FP or int). 233 void printReg(std::ostream &os, RegId reg) const; 234 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 218 unchanged lines hidden (view full) --- 227 : StaticInst(mnem, _machInst, __opClass) 228 { 229 } 230 231 /// Print a register name for disassembly given the unique 232 /// dependence tag number (FP or int). 233 void printReg(std::ostream &os, RegId reg) const; 234 |
235 std::string 236 generateDisassembly(Addr pc, const SymbolTable *symtab) const; | 235 std::string generateDisassembly( 236 Addr pc, const SymbolTable *symtab) const override; |
237 238 void | 237 238 void |
239 advancePC(AlphaISA::PCState &pcState) const | 239 advancePC(AlphaISA::PCState &pcState) const override |
240 { 241 pcState.advance(); 242 } 243 244 public: 245 size_t 246 asBytes(void *buf, size_t max_size) override 247 { --- 10 unchanged lines hidden (view full) --- 258 ccprintf(os, "r%d", reg.index()); 259 } 260 else { 261 ccprintf(os, "f%d", reg.index()); 262 } 263 } 264 265 std::string | 240 { 241 pcState.advance(); 242 } 243 244 public: 245 size_t 246 asBytes(void *buf, size_t max_size) override 247 { --- 10 unchanged lines hidden (view full) --- 258 ccprintf(os, "r%d", reg.index()); 259 } 260 else { 261 ccprintf(os, "f%d", reg.index()); 262 } 263 } 264 265 std::string |
266 AlphaStaticInst::generateDisassembly(Addr pc, 267 const SymbolTable *symtab) const | 266 AlphaStaticInst::generateDisassembly( 267 Addr pc, const SymbolTable *symtab) const |
268 { 269 std::stringstream ss; 270 271 ccprintf(ss, "%-10s ", mnemonic); 272 273 // just print the first two source regs... if there's 274 // a third one, it's a read-modify-write dest (Rc), 275 // e.g. for CMOVxx --- 23 unchanged lines hidden (view full) --- 299 * Static instruction class for "%(mnemonic)s". 300 */ 301 class %(class_name)s : public %(base_class)s 302 { 303 public: 304 /// Constructor. 305 %(class_name)s(ExtMachInst machInst); 306 | 268 { 269 std::stringstream ss; 270 271 ccprintf(ss, "%-10s ", mnemonic); 272 273 // just print the first two source regs... if there's 274 // a third one, it's a read-modify-write dest (Rc), 275 // e.g. for CMOVxx --- 23 unchanged lines hidden (view full) --- 299 * Static instruction class for "%(mnemonic)s". 300 */ 301 class %(class_name)s : public %(base_class)s 302 { 303 public: 304 /// Constructor. 305 %(class_name)s(ExtMachInst machInst); 306 |
307 Fault execute(ExecContext *, Trace::InstRecord *) const; | 307 Fault execute(ExecContext *, Trace::InstRecord *) const override; |
308 }; 309}}; 310 311// Basic instruction class constructor template. 312def template BasicConstructor {{ 313 %(class_name)s::%(class_name)s(ExtMachInst machInst) 314 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s) 315 { --- 62 unchanged lines hidden (view full) --- 378 : AlphaStaticInst("nop", _machInst, No_OpClass), 379 originalDisassembly(_originalDisassembly) 380 { 381 flags[IsNop] = true; 382 } 383 384 ~Nop() { } 385 | 308 }; 309}}; 310 311// Basic instruction class constructor template. 312def template BasicConstructor {{ 313 %(class_name)s::%(class_name)s(ExtMachInst machInst) 314 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s) 315 { --- 62 unchanged lines hidden (view full) --- 378 : AlphaStaticInst("nop", _machInst, No_OpClass), 379 originalDisassembly(_originalDisassembly) 380 { 381 flags[IsNop] = true; 382 } 383 384 ~Nop() { } 385 |
386 std::string 387 generateDisassembly(Addr pc, const SymbolTable *symtab) const; | 386 std::string generateDisassembly( 387 Addr pc, const SymbolTable *symtab) const override; |
388 | 388 |
389 Fault execute(ExecContext *, Trace::InstRecord *) const; | 389 Fault execute(ExecContext *, Trace::InstRecord *) const override; |
390 }; 391 392 /// Helper function for decoding nops. Substitute Nop object 393 /// for original inst passed in as arg (and delete latter). 394 static inline 395 AlphaStaticInst * 396 makeNop(AlphaStaticInst *inst) 397 { --- 76 unchanged lines hidden --- | 390 }; 391 392 /// Helper function for decoding nops. Substitute Nop object 393 /// for original inst passed in as arg (and delete latter). 394 static inline 395 AlphaStaticInst * 396 makeNop(AlphaStaticInst *inst) 397 { --- 76 unchanged lines hidden --- |