Mercurial > hg > truffle
comparison src/cpu/x86/vm/assembler_x86.cpp @ 3783:de6a837d75cf
7056380: VM crashes with SIGSEGV in compiled code
Summary: code was using andq reg, imm instead of addq addr, imm
Reviewed-by: kvn, jrose, twisti
author | never |
---|---|
date | Tue, 21 Jun 2011 09:04:55 -0700 |
parents | 5cf771a79037 |
children | be4ca325525a 95134e034042 |
comparison
equal
deleted
inserted
replaced
3782:aacaff365100 | 3783:de6a837d75cf |
---|---|
3802 void Assembler::addq(Register dst, Register src) { | 3802 void Assembler::addq(Register dst, Register src) { |
3803 (void) prefixq_and_encode(dst->encoding(), src->encoding()); | 3803 (void) prefixq_and_encode(dst->encoding(), src->encoding()); |
3804 emit_arith(0x03, 0xC0, dst, src); | 3804 emit_arith(0x03, 0xC0, dst, src); |
3805 } | 3805 } |
3806 | 3806 |
3807 void Assembler::andq(Address dst, int32_t imm32) { | |
3808 InstructionMark im(this); | |
3809 prefixq(dst); | |
3810 emit_byte(0x81); | |
3811 emit_operand(rsp, dst, 4); | |
3812 emit_long(imm32); | |
3813 } | |
3814 | |
3807 void Assembler::andq(Register dst, int32_t imm32) { | 3815 void Assembler::andq(Register dst, int32_t imm32) { |
3808 (void) prefixq_and_encode(dst->encoding()); | 3816 (void) prefixq_and_encode(dst->encoding()); |
3809 emit_arith(0x81, 0xE0, dst, imm32); | 3817 emit_arith(0x81, 0xE0, dst, imm32); |
3810 } | 3818 } |
3811 | 3819 |