Merge pull request #176 from joshuawarner32/shift-32-bit-regression

fix #172, regression in compiling shift operations
This commit is contained in:
Joel Dice 2014-02-24 13:55:26 -07:00
commit 3ce78cf8c1

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