1508 emit_int8((unsigned char)0xFF); |
1508 emit_int8((unsigned char)0xFF); |
1509 emit_operand(rdx, adr); |
1509 emit_operand(rdx, adr); |
1510 } |
1510 } |
1511 |
1511 |
1512 void Assembler::call_literal(address entry, RelocationHolder const& rspec) { |
1512 void Assembler::call_literal(address entry, RelocationHolder const& rspec) { |
1513 assert(entry != NULL, "call most probably wrong"); |
|
1514 InstructionMark im(this); |
1513 InstructionMark im(this); |
1515 emit_int8((unsigned char)0xE8); |
1514 emit_int8((unsigned char)0xE8); |
1516 intptr_t disp = entry - (pc() + sizeof(int32_t)); |
1515 intptr_t disp = entry - (pc() + sizeof(int32_t)); |
1517 assert(is_simm32(disp), "must be 32bit offset (call2)"); |
1516 // Entry is NULL in case of a scratch emit. |
|
1517 assert(entry == NULL || is_simm32(disp), "disp=" INTPTR_FORMAT " must be 32bit offset (call2)", disp); |
1518 // Technically, should use call32_operand, but this format is |
1518 // Technically, should use call32_operand, but this format is |
1519 // implied by the fact that we're emitting a call instruction. |
1519 // implied by the fact that we're emitting a call instruction. |
1520 |
1520 |
1521 int operand = LP64_ONLY(disp32_operand) NOT_LP64(call32_operand); |
1521 int operand = LP64_ONLY(disp32_operand) NOT_LP64(call32_operand); |
1522 emit_data((int) disp, rspec, operand); |
1522 emit_data((int) disp, rspec, operand); |