Skip to content

Commit 9e5aeed

Browse files
rainersthewilsonator
authored andcommitted
fix unittest when building with optimizing LDC
1 parent 061863c commit 9e5aeed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

compiler/src/dmd/backend/arm/disasmarm.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,8 @@ ulong decodeNImmrImms(uint N, uint immr, uint imms)
30843084
if (immr >= size)
30853085
return 0; // cannot decode it
30863086
ulong pattern = (1L << (length + 1)) - 1;
3087-
pattern = (pattern >> immr) | (pattern << size - immr); // rotate right
3087+
if (immr > 0) // avoid shifting by 64
3088+
pattern = (pattern >> immr) | (pattern << size - immr); // rotate right
30883089
ulong result = 0;
30893090
foreach (i; 0 .. 64 / size)
30903091
{

0 commit comments

Comments
 (0)