Exemplo n.º 1
0
bool
OMR::SymbolReference::storeCanBeRemoved()
   {
   TR::Compilation *comp = TR::comp();
   TR::Symbol * s = self()->getSymbol();

   return !s->isVolatile() &&
     (((s->getDataType() != TR::Double) && (s->getDataType() != TR::Float)) ||
           comp->cg()->getSupportsJavaFloatSemantics() ||
           (self()->isTemporary(comp) && !s->behaveLikeNonTemp()));
   }
Exemplo n.º 2
0
uint8_t TR::ExternalRelocation::collectModifier()
   {
   TR::Compilation *comp = TR::comp();
   uint8_t * relocatableMethodCodeStart = (uint8_t *)comp->getRelocatableMethodCodeStart();
   uint8_t * updateLocation = getUpdateLocation();

   int32_t distanceFromStartOfBuffer = updateLocation - relocatableMethodCodeStart;
   int32_t distanceFromStartOfMethod = updateLocation - comp->cg()->getCodeStart();
   AOTcgDiag2(comp, "TR::ExternalRelocation::collectModifier distance from start of buffer=%x, from start of method=%x\n", distanceFromStartOfBuffer, distanceFromStartOfMethod);

   if (distanceFromStartOfBuffer < MIN_SHORT_OFFSET || distanceFromStartOfBuffer > MAX_SHORT_OFFSET)
      return RELOCATION_TYPE_WIDE_OFFSET;

   return 0;
   }