request.hh (6427:50125d42559c) | request.hh (6428:9e35cdc95e81) |
---|---|
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 | 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(). */ |
|
350 void 351 setFlags(Flags flags) 352 { 353 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 354 _flags.set(flags); 355 } 356 357 /** Accessor function for vaddr.*/ --- 15 unchanged lines hidden (view full) --- 373 /** Accessor function for asi.*/ 374 uint8_t 375 getAsi() 376 { 377 assert(privateFlags.isSet(VALID_VADDR)); 378 return _flags & ASI_BITS; 379 } 380 | 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 |
381 /** Accessor function for MMAPED_IPR flag. */ 382 bool 383 isMmapedIpr() 384 { 385 assert(privateFlags.isSet(VALID_PADDR)); 386 return _flags.isSet(MMAPED_IPR); 387 } 388 389 void 390 setMmapedIpr(bool r) 391 { 392 assert(VALID_VADDR); 393 _flags.set(MMAPED_IPR); 394 } 395 | |
396 /** Accessor function to check if sc result is valid. */ 397 bool 398 extraDataValid() 399 { 400 return privateFlags.isSet(VALID_EXTRA_DATA); 401 } 402 403 /** Accessor function for store conditional return value.*/ --- 43 unchanged lines hidden (view full) --- 447 /** Accessor function for pc.*/ 448 Addr 449 getPC() const 450 { 451 assert(privateFlags.isSet(VALID_PC)); 452 return _pc; 453 } 454 | 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 |
455 /** Accessor Function to Check Cacheability. */ | 444 /** Accessor functions for flags. Note that these are for testing 445 only; setting flags should be done via setFlags(). */ |
456 bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); } 457 bool isInstFetch() const { return _flags.isSet(INST_FETCH); } 458 bool isPrefetch() const { return _flags.isSet(PREFETCH); } 459 bool isLLSC() const { return _flags.isSet(LLSC); } 460 bool isLocked() const { return _flags.isSet(LOCKED); } 461 bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); } 462 bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); } | 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); } |
|
463 464 bool 465 isMisaligned() const 466 { 467 if (_flags.isSet(NO_ALIGN_FAULT)) 468 return false; 469 470 if ((_vaddr & 0x1)) --- 13 unchanged lines hidden --- | 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 --- |