| Index: src/x64/assembler-x64.cc
|
| ===================================================================
|
| --- src/x64/assembler-x64.cc (revision 4405)
|
| +++ src/x64/assembler-x64.cc (working copy)
|
| @@ -1139,22 +1139,24 @@
|
| EnsureSpace ensure_space(this);
|
| last_pc_ = pc_;
|
| if (L->is_bound()) {
|
| + const int short_size = sizeof(int8_t);
|
| + const int long_size = sizeof(int32_t);
|
| int offs = L->pos() - pc_offset() - 1;
|
| ASSERT(offs <= 0);
|
| - if (is_int8(offs - sizeof(int8_t))) {
|
| + if (is_int8(offs - short_size)) {
|
| // 1110 1011 #8-bit disp.
|
| emit(0xEB);
|
| - emit((offs - sizeof(int8_t)) & 0xFF);
|
| + emit((offs - short_size) & 0xFF);
|
| } else {
|
| // 1110 1001 #32-bit disp.
|
| emit(0xE9);
|
| - emitl(offs - sizeof(int32_t));
|
| + emitl(offs - long_size);
|
| }
|
| } else if (L->is_linked()) {
|
| // 1110 1001 #32-bit disp.
|
| emit(0xE9);
|
| emitl(L->pos());
|
| - L->link_to(pc_offset() - sizeof(int32_t));
|
| + L->link_to(pc_offset() - long_size);
|
| } else {
|
| // 1110 1001 #32-bit disp.
|
| ASSERT(L->is_unused());
|
|
|