1/* 2 * Copyright (c) 2002-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; --- 333 unchanged lines hidden (view full) --- 342 /** Accessor for flags. */ 343 Flags 344 getFlags() 345 { 346 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 347 return _flags; 348 } 349 |
350 /** Note that unlike other accessors, this function sets *specific 351 flags* (ORs them in); it does not assign its argument to the 352 _flags field. Thus this method should rightly be called 353 setFlags() and not just flags(). */ |
354 void 355 setFlags(Flags flags) 356 { 357 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 358 _flags.set(flags); 359 } 360 361 /** Accessor function for vaddr.*/ --- 15 unchanged lines hidden (view full) --- 377 /** Accessor function for asi.*/ 378 uint8_t 379 getAsi() 380 { 381 assert(privateFlags.isSet(VALID_VADDR)); 382 return _flags & ASI_BITS; 383 } 384 |
385 /** Accessor function to check if sc result is valid. */ 386 bool 387 extraDataValid() 388 { 389 return privateFlags.isSet(VALID_EXTRA_DATA); 390 } 391 392 /** Accessor function for store conditional return value.*/ --- 43 unchanged lines hidden (view full) --- 436 /** Accessor function for pc.*/ 437 Addr 438 getPC() const 439 { 440 assert(privateFlags.isSet(VALID_PC)); 441 return _pc; 442 } 443 |
444 /** Accessor functions for flags. Note that these are for testing 445 only; setting flags should be done via setFlags(). */ |
446 bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); } 447 bool isInstFetch() const { return _flags.isSet(INST_FETCH); } 448 bool isPrefetch() const { return _flags.isSet(PREFETCH); } 449 bool isLLSC() const { return _flags.isSet(LLSC); } 450 bool isLocked() const { return _flags.isSet(LOCKED); } 451 bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); } 452 bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); } |
453 bool isMmapedIpr() const { return _flags.isSet(MMAPED_IPR); } |
454 455 bool 456 isMisaligned() const 457 { 458 if (_flags.isSet(NO_ALIGN_FAULT)) 459 return false; 460 461 if ((_vaddr & 0x1)) --- 13 unchanged lines hidden --- |