summaryrefslogtreecommitdiffstats
path: root/import/hwpf/fapi2/include
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2015-10-29 14:20:53 +0530
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-10-23 15:53:46 -0500
commit8f67e70cb9fc645f326f50ed4fba97018e2cd8d4 (patch)
tree3ed881588048220d93fff9322de4d3ca3dc74f98 /import/hwpf/fapi2/include
parent290245beede63fa5e26fbb48d90eaa029593cb70 (diff)
downloadtalos-hcode-8f67e70cb9fc645f326f50ed4fba97018e2cd8d4.tar.gz
talos-hcode-8f67e70cb9fc645f326f50ed4fba97018e2cd8d4.zip
Fix mask calculation in buffer insert function
Change-Id: Iec346df5b73f4e1796a73b1c6ac8fcebfcf58c4d Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21589 Tested-by: Jenkins Server Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/hwpf/fapi2/include')
-rw-r--r--import/hwpf/fapi2/include/buffer.H10
1 files changed, 5 insertions, 5 deletions
diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H
index 794193f8..625de347 100644
--- a/import/hwpf/fapi2/include/buffer.H
+++ b/import/hwpf/fapi2/include/buffer.H
@@ -483,8 +483,8 @@ class buffer
(target_length - TS);
// Get mask value for Target buffer
- // Note: Need "& 0UL" because bit shift left for Target buffer doesn't roll off
- uint64_t mask = ((~0UL << (parameterTraits<uint64_t>::bit_length() - L)) & ~0UL)
+ // Note: Need "& 0ULL" because bit shift left for Target buffer doesn't roll off
+ uint64_t mask = ((~0ULL << (parameterTraits<uint64_t>::bit_length() - L)) & ~0ULL)
>> target_start;
// Align the source to the target. Make things signed so we know which way to shift.
@@ -557,9 +557,9 @@ class buffer
(target_length - i_targetStart);
// Get mask value for Target buffer
- // Note: Need "& 0UL" because bit shift left for Target buffer doesn't roll off
- uint64_t mask = ((~0UL << (parameterTraits<uint64_t>::bit_length() - i_len)) &
- ~0UL) >> target_start;
+ // Note: Need "& 0ULL" because bit shift left for Target buffer doesn't roll off
+ uint64_t mask = ((~0ULL << (parameterTraits<uint64_t>::bit_length() - i_len)) &
+ ~0ULL) >> target_start;
// Align the source to the target. Make things signed so we know which way to shift.
int32_t shift = source_start - target_start;
OpenPOWER on IntegriCloud