Skip to content

Commit

Permalink
Fix MOVI.N immediate calculation
Browse files Browse the repository at this point in the history
Reported by @edi1 in yath#1, thanks!
  • Loading branch information
marcushall42 committed Dec 30, 2019
1 parent c964722 commit 57308e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/languages/xtensa.sinc
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ s16_16.23_8.11: tmp is u4_8.11 & u8_16.23 [

# An “asymmetric” immediate from -32..95, used by MOVI.N.
n_s8_12.15_4.6_asymm: tmp is n_s3_4.6 & n_s4_12.15 [
tmp = ((((n_s3_4.6 >> 2) & 1) & ((n_s3_4.6 >> 3) & 1)) << 7) | # sign
(n_s3_4.6 << 4) | n_s4_12.15;
tmp = ((((n_s3_4.6 & 7) << 4) | (n_s4_12.15 & 15)) |
((((n_s3_4.6 >> 2) & 1) & ((n_s3_4.6 >> 1) & 1)) << 7));
] { export *[const]:1 tmp; }

# Immediates shifted or with offset.
Expand Down

0 comments on commit 57308e5

Please sign in to comment.