mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2913 addressing code review comments
This commit is contained in:
parent
e600b96980
commit
93d3808232
2 changed files with 4 additions and 4 deletions
|
@ -479,7 +479,7 @@ inline bool Range::contains(const Address &addr) const {
|
|||
|
||||
/// \param size is the desired size in bytes
|
||||
/// \return a value appropriate for masking off the first \e size bytes
|
||||
inline uintb calc_mask(uint4 size) { return uintbmasks[(size<8)? size : 8]; }
|
||||
inline uintb calc_mask(int4 size) { return uintbmasks[((uint4)size) < 8 ? size : 8]; }
|
||||
|
||||
/// Perform a CPUI_INT_RIGHT on the given val
|
||||
/// \param val is the value to shift
|
||||
|
@ -518,7 +518,7 @@ inline uintb minimalmask(uintb val)
|
|||
}
|
||||
|
||||
extern bool signbit_negative(uintb val,int4 size); ///< Return true if the sign-bit is set
|
||||
extern uintb calc_mask(uint4 size); ///< Calculate a mask for a given byte size
|
||||
extern uintb calc_mask(int4 size); ///< Calculate a mask for a given byte size
|
||||
extern uintb uintb_negate(uintb in,int4 size); ///< Negate the \e sized value
|
||||
extern uintb sign_extend(uintb in,int4 sizein,int4 sizeout); ///< Sign-extend a value between two byte sizes
|
||||
|
||||
|
|
|
@ -2199,8 +2199,8 @@ const Location *SleighCompile::getLocation(SleighSymbol *sym) const
|
|||
{
|
||||
try {
|
||||
return &symbolLocationMap.at(sym);
|
||||
} catch (const std::out_of_range &e) {
|
||||
return NULL;
|
||||
} catch (const out_of_range &e) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue