Skip to content

Commit

Permalink
#13415: Update left shift
Browse files Browse the repository at this point in the history
  • Loading branch information
VirdhatchaniKN committed Nov 28, 2024
1 parent ebca9fa commit e336021
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
vInt val = dst_reg[0];
vInt v = val;

val = val << shift_amt;
val = setsgn(val, v);
dst_reg[0] = val;

TTI_SFPLOAD(0,12,ADDR_MOD_7,0);
TT_SFPSHFT(shift_amt,0,0,1);
TTI_SFPSTORE(0,12,ADDR_MOD_7,0);
dst_reg++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
vInt val = dst_reg[0];
vInt v = val;

val = val << shift_amt;
val = setsgn(val, v);
dst_reg[0] = val;

TTI_SFPLOAD(0,4,3,0);
TT_SFPSHFT(shift_amt,0,0,1);
TTI_SFPSTORE(0,4,3,0);
dst_reg++;
}
}
Expand Down

0 comments on commit e336021

Please sign in to comment.