Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/nativeInst_x86.cpp @ 13223:78c808233ff1
ensure instruction at verified entry point is safely patchable (GRAAL-605)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 02 Dec 2013 17:03:22 +0100 |
parents | cd3d6a6b95d9 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
13209:b96cc3b87e87 | 13223:78c808233ff1 |
---|---|
470 // entry point is in same cache line as unverified entry point, and the instruction being | 470 // entry point is in same cache line as unverified entry point, and the instruction being |
471 // patched is >= 5 byte (size of patch). | 471 // patched is >= 5 byte (size of patch). |
472 // | 472 // |
473 // In C2 the 5+ byte sized instruction is enforced by code in MachPrologNode::emit. | 473 // In C2 the 5+ byte sized instruction is enforced by code in MachPrologNode::emit. |
474 // In C1 the restriction is enforced by CodeEmitter::method_entry | 474 // In C1 the restriction is enforced by CodeEmitter::method_entry |
475 // In Graal, the restriction is enforced by HotSpotFrameContext.enter(...) | |
475 // | 476 // |
476 void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) { | 477 void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) { |
477 // complete jump instruction (to be inserted) is in code_buffer; | 478 // complete jump instruction (to be inserted) is in code_buffer; |
478 unsigned char code_buffer[5]; | 479 unsigned char code_buffer[5]; |
479 code_buffer[0] = instruction_code; | 480 code_buffer[0] = instruction_code; |