fix #172, regression in compiling shift operations

This commit is contained in:
Joshua Warner 2014-02-24 13:22:17 -07:00
parent 4a436bad80
commit f1806ce90e

View File

@ -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);