Beispiel #1
0
SetUnionStrBuilder::SetUnionStrBuilder(TR::TypeDictionary *d)
   : MethodBuilder(d)
   {
   DefineFile(__FILE__);
   DefineLine(LINETOSTR(__LINE__));

   DefineName("setUnionStr");
   DefineParameter("u", d->PointerTo(d->LookupUnion("TestUnionInt8pChar")));
   DefineParameter("v", d->toIlType<char*>());
   DefineReturnType(NoType);
   }
Beispiel #2
0
TypePunInt16DoubleBuilder::TypePunInt16DoubleBuilder(TR::TypeDictionary *d)
   : MethodBuilder(d)
   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   DefineName("typePunInt16Double");
   DefineParameter("u", d->PointerTo(d->LookupUnion("TestUnionInt16Double")));
   DefineParameter("v1", Int16);
   DefineParameter("v2", Double);
   DefineReturnType(Int16);
   }
Beispiel #3
0
void
InliningRecursiveFibonacciMethod::defineStuff()
   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   DefineName("fib");
   DefineParameter("n", Int32);
   DefineReturnType(Int32);

   DefineFunction((char *)"printString",
                  (char *)__FILE__,
                  (char *)PRINTSTRING_LINE,
                  (void *)&printString,
                  NoType,
                  1,
                  Int64);
   DefineFunction((char *)"printInt32",
                  (char *)__FILE__,
                  (char *)PRINTINT32_LINE,
                  (void *)&printInt32,
                  NoType,
                  1,
                  Int32);
   }
Beispiel #4
0
DotProduct::DotProduct(TR::TypeDictionary *types)
   : MethodBuilder(types)

   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   DefineName("dotproduct");

   pDouble = types->PointerTo(Double);

   DefineParameter("result", pDouble);
   DefineParameter("vector1", pDouble);
   DefineParameter("vector2", pDouble);
   DefineParameter("length", Int32);

   DefineReturnType(NoType);

   DefineFunction((char *)"printString", 
                  (char *)__FILE__,
                  (char *)PRINTSTRING_LINE,
                  (void *)&printString,
                  NoType,
                  1,
                  Int64);
   DefineFunction((char *)"printInt32", 
                  (char *)__FILE__,
                  (char *)PRINTINT32_LINE,
                  (void *)&printInt32,
                  NoType,
                  1,
                  Int32);
   DefineFunction((char *)"printDouble", 
                  (char *)__FILE__,
                  (char *)PRINTDOUBLE_LINE,
                  (void *)&printDouble,
                  NoType,
                  1,
                  Double);
   DefineFunction((char *)"printPointer", 
                  (char *)__FILE__,
                  (char *)PRINTPOINTER_LINE,
                  (void *)&printPointer,
                  NoType,
                  1,
                  Int64);
   }
Beispiel #5
0
GetUnionByteBuilder::GetUnionByteBuilder(TR::TypeDictionary *d)
   : MethodBuilder(d)
   {
   DefineFile(__FILE__);
   DefineLine(LINETOSTR(__LINE__));

   DefineName("getUnionByte");
   DefineParameter("u", d->PointerTo(d->LookupUnion("TestUnionInt8pChar")));
   DefineReturnType(Int8);
   }
Beispiel #6
0
MatMult::MatMult(OMR::JitBuilder::TypeDictionary *types)
   : OMR::JitBuilder::MethodBuilder(types)
   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   DefineName("matmult");

   pDouble = types->PointerTo(Double);

   // C = A * B, all NxN matrices
   DefineParameter("C", pDouble);
   DefineParameter("A", pDouble);
   DefineParameter("B", pDouble);
   DefineParameter("N", Int32);

   DefineReturnType(NoType);

   DefineLocal("sum", Double);
   }
Beispiel #7
0
ThunkBuilder::ThunkBuilder(TR::TypeDictionary *types, const char *name, TR::IlType *returnType,
                           uint32_t numCalleeParams, TR::IlType **calleeParamTypes)
   : TR::MethodBuilder(types),
   _numCalleeParams(numCalleeParams),
   _calleeParamTypes(calleeParamTypes)
   {
   DefineLine(__FILE__);
   DefineFile(LINETOSTR(__LINE__));
   DefineName(name);
   DefineReturnType(returnType);
   DefineParameter("target", Address); // target
   DefineParameter("args", types->PointerTo(Word));     // array of arguments

   DefineFunction("thunkCallee",
                  __FILE__,
                  LINETOSTR(__LINE__),
                  0, // entry will be a computed value
                  returnType,
                  numCalleeParams,
                  calleeParamTypes);
   }
Beispiel #8
0
GetUnionFieldAddressBuilder::GetUnionFieldAddressBuilder(TR::TypeDictionary *d)
   : MethodBuilder(d)
   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   pUnionType = d->PointerTo(d->LookupUnion("Union"));

   DefineName("getUnionFieldAddress");
   DefineParameter("u", pUnionType);
   DefineReturnType(d->toIlType<uint8_t *>());
   }
Beispiel #9
0
GetStructFieldAddressBuilder::GetStructFieldAddressBuilder(TR::TypeDictionary *d)
   : MethodBuilder(d)
   {
   DefineLine(LINETOSTR(__LINE__));
   DefineFile(__FILE__);

   pStructType = d->PointerTo(d->LookupStruct("Struct"));

   DefineName("getStructFieldAddress");
   DefineParameter("s", pStructType);
   DefineReturnType(d->PointerTo(d->GetFieldType("Struct", "f2")));
   }