Skip to content

Commit 76a2d19

Browse files
committed
Fix wop_primExtractWide to accept a const reference
1 parent 6d3a36b commit 76a2d19

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/bluesim/bs_prim_ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ static inline void wop_primExtractWide(unsigned int dst_sz,
16541654

16551655
static inline void wop_primExtractWide(unsigned int dst_sz,
16561656
unsigned int src_sz,
1657-
tUWide & src,
1657+
const tUWide & src,
16581658
unsigned int high_sz, unsigned int high,
16591659
unsigned int low_sz, unsigned int low,
16601660
tUWide &dst)

src/bluesim/bs_wide_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class WideData
102102
unsigned int extract32(unsigned int hi, unsigned int lo) const;
103103
unsigned long long extract64(unsigned int hi, unsigned int lo) const;
104104
WideData extractWide(unsigned int hi, unsigned int lo) const;
105-
void wop_extractWide(unsigned int hi, unsigned int lo, WideData& result);
105+
void wop_extractWide(unsigned int hi, unsigned int lo, WideData& result) const;
106106
void clear(unsigned int from = 0);
107107
void clear(unsigned int from, unsigned int to);
108108
void set(unsigned int from = 0);

src/bluesim/wide_data.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ void wop_rem(const WideData& v1, const WideData& v2, WideData &result)
17551755
/*** function calls ***/
17561756

17571757
/* maybe useful */
1758-
void WideData::wop_extractWide(uint hi, uint lo, WideData& result)
1758+
void WideData::wop_extractWide(uint hi, uint lo, WideData& result) const
17591759
{
17601760
copy_bits_to_0(result.data, data, lo, (hi-lo+1));
17611761
clear_bits(result.data, (hi-lo+1), (result.numWords() * WORD_SIZE) - 1);

0 commit comments

Comments
 (0)