Skip to content

Commit

Permalink
Merge pull request #3135 from jdmpapin/thunk-address
Browse files Browse the repository at this point in the history
Skip getJ2IThunk() when writing x86 PIC data
  • Loading branch information
andrewcraik authored Oct 4, 2018
2 parents 47c4910 + 161f7fa commit a17230d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions runtime/compiler/x/codegen/CallSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,10 @@ uint8_t *TR::X86PicDataSnippet::encodeConstantPoolInfo(uint8_t *cursor)
uint8_t *TR::X86PicDataSnippet::encodeJ2IThunkPointer(uint8_t *cursor)
{
TR_ASSERT_FATAL(_hasJ2IThunkInPicData, "did not expect j2i thunk pointer");

// Find the j2i thunk for this method's signature
TR_J9VMBase *fej9 = (TR_J9VMBase*)(cg()->fe());
TR::Symbol *symbol = _methodSymRef->getSymbol();
TR_Method *method = symbol->getMethodSymbol()->getMethod();
void *j2iThunk = fej9->getJ2IThunk(method, comp());
TR_ASSERT_FATAL(j2iThunk != NULL, "null virtual j2i thunk");
TR_ASSERT_FATAL(_thunkAddress != NULL, "null virtual j2i thunk");

// DD/DQ j2iThunk
// TODO: AOT relocation
*(uintptrj_t *)cursor = (uintptrj_t)j2iThunk;
*(uintptrj_t *)cursor = (uintptrj_t)_thunkAddress;
cursor += sizeof(uintptrj_t);

return cursor;
Expand Down

0 comments on commit a17230d

Please sign in to comment.