Skip to content

Commit 95103c3

Browse files
Correct getters in generated commands
cast to uint64_t before shifting value Related-To: NEO-6475 Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent d2462ff commit 95103c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5262,9 +5262,9 @@ typedef struct tagL3_FLUSH_ADDRESS_RANGE {
52625262

52635263
inline uint64_t getAddressLow(bool isA0Stepping) const {
52645264
if (isA0Stepping) {
5265-
return (TheStructure.CommonA0Stepping.AddressLow << ADDRESSLOW_BIT_SHIFT) & uint64_t(0xffffffff);
5265+
return (static_cast<uint64_t>(TheStructure.CommonA0Stepping.AddressLow) << ADDRESSLOW_BIT_SHIFT) & uint64_t(0xffffffff);
52665266
} else {
5267-
return (TheStructure.Common.AddressLow << ADDRESSLOW_BIT_SHIFT);
5267+
return (static_cast<uint64_t>(TheStructure.Common.AddressLow) << ADDRESSLOW_BIT_SHIFT);
52685268
}
52695269
}
52705270

shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6804,7 +6804,7 @@ typedef struct tagL3_FLUSH_ADDRESS_RANGE {
68046804
}
68056805

68066806
inline uint64_t getAddressLow() const {
6807-
return (TheStructure.Common.AddressLow << ADDRESSLOW_BIT_SHIFT);
6807+
return (static_cast<uint64_t>(TheStructure.Common.AddressLow) << ADDRESSLOW_BIT_SHIFT);
68086808
}
68096809

68106810
inline void setAddressHigh(const uint64_t value) {
@@ -6863,7 +6863,7 @@ struct L3_CONTROL_POST_SYNC_DATA {
68636863
TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT;
68646864
}
68656865
inline uint64_t getAddress() const {
6866-
return TheStructure.Common.Address << ADDRESS_BIT_SHIFT;
6866+
return static_cast<uint64_t>(TheStructure.Common.Address) << ADDRESS_BIT_SHIFT;
68676867
}
68686868
inline void setImmediateData(const uint64_t value) {
68696869
TheStructure.Common.ImmediateData = value;

0 commit comments

Comments
 (0)