From f1806ce90e947ecefdfb2bbf34dc27c153cee006 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Mon, 24 Feb 2014 13:22:17 -0700 Subject: [PATCH] fix #172, regression in compiling shift operations --- src/codegen/target/x86/operations.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/codegen/target/x86/operations.cpp b/src/codegen/target/x86/operations.cpp index f7a03e952f..4b4acc94d8 100644 --- a/src/codegen/target/x86/operations.cpp +++ b/src/codegen/target/x86/operations.cpp @@ -1280,7 +1280,8 @@ void shiftLeftRR(Context* c, UNUSED unsigned aSize, lir::Register* a, ResolvedPromise promise(32); lir::Constant constant(&promise); - compareCR(c, aSize, &constant, aSize, &cx); + compareCR(c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, + &cx); opcode(c, 0x7c); //jl c->code.append(2 + 2); @@ -1324,7 +1325,8 @@ void shiftRightRR(Context* c, UNUSED unsigned aSize, lir::Register* a, ResolvedPromise promise(32); lir::Constant constant(&promise); - compareCR(c, aSize, &constant, aSize, &cx); + compareCR(c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, + &cx); opcode(c, 0x7c); //jl c->code.append(2 + 3); @@ -1371,7 +1373,8 @@ void unsignedShiftRightRR(Context* c, UNUSED unsigned aSize, lir::Register* a, ResolvedPromise promise(32); lir::Constant constant(&promise); - compareCR(c, aSize, &constant, aSize, &cx); + compareCR(c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, + &cx); opcode(c, 0x7c); //jl c->code.append(2 + 2);