Skip to content

Commit

Permalink
Fix bug in i64.rotr X 0 in compiler-llvm, add wasmer wast tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed Mar 26, 2021
1 parent edb02f6 commit 74a0550
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 61 deletions.
4 changes: 2 additions & 2 deletions lib/compiler-llvm/src/translator/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3118,8 +3118,8 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
let v2 = self.builder.build_and(v2, mask, "");
let lhs = self.builder.build_right_shift(v1, v2, false, "");
let rhs = {
let int_width = self.intrinsics.i64_ty.const_int(64 as u64, false);
let rhs = self.builder.build_int_sub(int_width, v2, "");
let negv2 = self.builder.build_int_neg(v2, "");
let rhs = self.builder.build_and(negv2, mask, "");
self.builder.build_left_shift(v1, rhs, "")
};
let res = self.builder.build_or(lhs, rhs, "");
Expand Down
Loading

0 comments on commit 74a0550

Please sign in to comment.