Add function comments
authorMike Danes <onemihaid@hotmail.com>
Sat, 28 Oct 2017 08:24:13 +0000 (11:24 +0300)
committerMike Danes <onemihaid@hotmail.com>
Sat, 28 Oct 2017 08:24:13 +0000 (11:24 +0300)
src/jit/emit.cpp

index 970362768cc36b417785e131089e56a0519ca8e2..8e670d365959aef83277f4a6ddf3f8cf2f2ae14d 100644 (file)
@@ -5365,15 +5365,37 @@ UNATIVE_OFFSET emitter::emitDataConst(const void* cnsAddr, unsigned cnsSize, boo
 
 #ifndef LEGACY_BACKEND
 
+//------------------------------------------------------------------------
+// emitAnyConst: Create a data section constant of arbitrary size.
+//
+// Arguments:
+//    cnsAddr  - pointer to the data to be placed in the data section
+//    cnsSize  - size of the data
+//    dblAlign - whether to align the data section to an 8 byte boundary
+//
+// Return Value:
+//    A field handle representing the data offset to access the constant.
+//
 CORINFO_FIELD_HANDLE emitter::emitAnyConst(const void* cnsAddr, unsigned cnsSize, bool dblAlign)
 {
     UNATIVE_OFFSET cnum = emitDataConst(cnsAddr, cnsSize, dblAlign);
     return emitComp->eeFindJitDataOffs(cnum);
 }
 
-// Generates a float or double data section constant and returns field handle representing
-// the data offset to access the constant.  This is called by emitInsBinary() in case
-// of contained float of double constants.
+//------------------------------------------------------------------------
+// emitFltOrDblConst: Create a float or double data section constant.
+//
+// Arguments:
+//    constValue - constant value
+//    attr       - constant size
+//
+// Return Value:
+//    A field handle representing the data offset to access the constant.
+//
+// Notes:
+//    If attr is EA_4BYTE then the double value is converted to a float value.
+//    If attr is EA_8BYTE then 8 byte alignment is automatically requested.
+//
 CORINFO_FIELD_HANDLE emitter::emitFltOrDblConst(double constValue, emitAttr attr)
 {
     assert((attr == EA_4BYTE) || (attr == EA_8BYTE));