fix sign extension from int to long on x86_64

This commit is contained in:
Joel Dice 2009-08-07 14:48:30 -06:00
parent e5947b5ec0
commit 012d548bbb
2 changed files with 7 additions and 1 deletions

View File

@ -895,7 +895,7 @@ moveRR(Context* c, unsigned aSize, Assembler::Register* a,
case 4:
if (bSize == 8) {
if (BytesPerWord == 8) {
alwaysRex(c, aSize, b, a);
alwaysRex(c, bSize, b, a);
opcode(c, 0x63);
modrm(c, 0xc0, a, b);
} else {

View File

@ -35,7 +35,13 @@ public class Longs {
return a - (a % b);
}
private static int negativeOne() {
return -1;
}
public static void main(String[] args) {
expect(((long) negativeOne()) == -1);
{ long foo = 25214903884L;
int radix = 10;
expect(foo > 0);