Correct getters in generated commands

cast to uint64_t before shifting value

Related-To: NEO-6475
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-04-04 15:23:32 +00:00
committed by Compute-Runtime-Automation
parent d2462ff8fb
commit 95103c3a33
2 changed files with 4 additions and 4 deletions

View File

@@ -5262,9 +5262,9 @@ typedef struct tagL3_FLUSH_ADDRESS_RANGE {
inline uint64_t getAddressLow(bool isA0Stepping) const {
if (isA0Stepping) {
return (TheStructure.CommonA0Stepping.AddressLow << ADDRESSLOW_BIT_SHIFT) & uint64_t(0xffffffff);
return (static_cast<uint64_t>(TheStructure.CommonA0Stepping.AddressLow) << ADDRESSLOW_BIT_SHIFT) & uint64_t(0xffffffff);
} else {
return (TheStructure.Common.AddressLow << ADDRESSLOW_BIT_SHIFT);
return (static_cast<uint64_t>(TheStructure.Common.AddressLow) << ADDRESSLOW_BIT_SHIFT);
}
}

View File

@@ -6804,7 +6804,7 @@ typedef struct tagL3_FLUSH_ADDRESS_RANGE {
}
inline uint64_t getAddressLow() const {
return (TheStructure.Common.AddressLow << ADDRESSLOW_BIT_SHIFT);
return (static_cast<uint64_t>(TheStructure.Common.AddressLow) << ADDRESSLOW_BIT_SHIFT);
}
inline void setAddressHigh(const uint64_t value) {
@@ -6863,7 +6863,7 @@ struct L3_CONTROL_POST_SYNC_DATA {
TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT;
}
inline uint64_t getAddress() const {
return TheStructure.Common.Address << ADDRESS_BIT_SHIFT;
return static_cast<uint64_t>(TheStructure.Common.Address) << ADDRESS_BIT_SHIFT;
}
inline void setImmediateData(const uint64_t value) {
TheStructure.Common.ImmediateData = value;