Index: src/ia32/assembler-ia32.cc |
=================================================================== |
--- src/ia32/assembler-ia32.cc (revision 7757) |
+++ src/ia32/assembler-ia32.cc (working copy) |
@@ -1580,15 +1580,27 @@ |
} |
+int Assembler::CallSize(const Operand& adr) { |
+ // Call size is 1 (opcode) + adr.len_ (operand). |
+ return 1 + adr.len_; |
+} |
+ |
+ |
void Assembler::call(const Operand& adr) { |
positions_recorder()->WriteRecordedPositions(); |
EnsureSpace ensure_space(this); |
last_pc_ = pc_; |
EMIT(0xFF); |
emit_operand(edx, adr); |
+ ASSERT(pc_ - last_pc_ == CallSize(adr)); |
} |
+int Assembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode) { |
+ return 1 /* EMIT */ + sizeof(uint32_t) /* emit */; |
+} |
+ |
+ |
void Assembler::call(Handle<Code> code, |
RelocInfo::Mode rmode, |
unsigned ast_id) { |