Mercurial > hg > truffle
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 8151:b8f261ba79c6
Minimize diff to plain HotSpot version.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 21:00:29 +0100 |
parents | c66aa27ef4da |
children | b89a97928e72 |
comparison
equal
deleted
inserted
replaced
8150:b66f831ac5ab | 8151:b8f261ba79c6 |
---|---|
615 | 615 |
616 assert((hotspot_method ? 1 : 0) + (global_stub ? 1 : 0) == 1, "Call site needs exactly one type"); | 616 assert((hotspot_method ? 1 : 0) + (global_stub ? 1 : 0) == 1, "Call site needs exactly one type"); |
617 | 617 |
618 NativeInstruction* inst = nativeInstruction_at(_instructions->start() + pc_offset); | 618 NativeInstruction* inst = nativeInstruction_at(_instructions->start() + pc_offset); |
619 jint next_pc_offset = 0x0; | 619 jint next_pc_offset = 0x0; |
620 bool is_call_reg = false; | |
621 if (inst->is_call() || inst->is_jump()) { | 620 if (inst->is_call() || inst->is_jump()) { |
622 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size"); | 621 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size"); |
623 next_pc_offset = pc_offset + NativeCall::instruction_size; | 622 next_pc_offset = pc_offset + NativeCall::instruction_size; |
624 } else if (inst->is_mov_literal64()) { | 623 } else if (inst->is_mov_literal64()) { |
625 // mov+call instruction pair | 624 // mov+call instruction pair |
628 assert((call[0] == 0x40 || call[0] == 0x41) && call[1] == 0xFF, "expected call with rex/rexb prefix byte"); | 627 assert((call[0] == 0x40 || call[0] == 0x41) && call[1] == 0xFF, "expected call with rex/rexb prefix byte"); |
629 next_pc_offset += 3; /* prefix byte + opcode byte + modrm byte */ | 628 next_pc_offset += 3; /* prefix byte + opcode byte + modrm byte */ |
630 } else if (inst->is_call_reg()) { | 629 } else if (inst->is_call_reg()) { |
631 // the inlined vtable stub contains a "call register" instruction | 630 // the inlined vtable stub contains a "call register" instruction |
632 assert(hotspot_method != NULL, "only valid for virtual calls"); | 631 assert(hotspot_method != NULL, "only valid for virtual calls"); |
633 is_call_reg = true; | |
634 next_pc_offset = pc_offset + ((NativeCallReg *) inst)->next_instruction_offset(); | 632 next_pc_offset = pc_offset + ((NativeCallReg *) inst)->next_instruction_offset(); |
635 } else { | 633 } else { |
636 tty->print_cr("at pc_offset %d", pc_offset); | |
637 fatal("unsupported type of instruction for call site"); | 634 fatal("unsupported type of instruction for call site"); |
638 } | 635 } |
639 | 636 |
640 if (target->is_a(SystemDictionary::HotSpotInstalledCode_klass())) { | 637 if (target->is_a(SystemDictionary::HotSpotInstalledCode_klass())) { |
641 assert(inst->is_jump(), "jump expected"); | 638 assert(inst->is_jump(), "jump expected"); |