diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2016-06-24 14:10:52 -0700 |
---|---|---|
committer | Michelle McDaniel <adiaaida@gmail.com> | 2016-07-29 09:16:39 -0700 |
commit | a1fa8c14cae981369dccf2f361b01959b215ad8f (patch) | |
tree | cfbd2c5020bacd9422a64338f513350057e3cae0 /src/jit/unwindarm.cpp | |
parent | a812669c5737a336745f42c099a1a8a6e1aafa4f (diff) | |
download | coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.tar.gz coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.tar.bz2 coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.zip |
Massage code for clang-format
This change starts the process of updating the jit code to make it ready
for being formatted by clang-format. Changes mostly include reflowing
comments that go past our column limit and moving comments around ifdefs
so clang-format does not modify the indentation. Additionally, some
header files are manually reformatted for pointer alignment and marked
as clang-format off so that we do not lose the current formatting.
Diffstat (limited to 'src/jit/unwindarm.cpp')
-rw-r--r-- | src/jit/unwindarm.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/jit/unwindarm.cpp b/src/jit/unwindarm.cpp index 29cbdcfa0e..1dcfd06f6b 100644 --- a/src/jit/unwindarm.cpp +++ b/src/jit/unwindarm.cpp @@ -590,9 +590,11 @@ void UnwindPrologCodes::SetFinalSize(int headerBytes, int epilogBytes // The prolog codes that are already at the end of the array need to get moved to the middle, // with space for the non-matching epilog codes to follow. + memmove_s(&upcMem[upcUnwindBlockSlot + headerBytes], upcMemSize - (upcUnwindBlockSlot + headerBytes), &upcMem[upcCodeSlot], prologBytes); // Note that the three UWC_END padding bytes still exist at the end of the array. + CLANG_FORMAT_COMMENT_ANCHOR; #ifdef DEBUG // Zero out the epilog codes memory, to ensure we've copied the right bytes. Don't zero the padding bytes. @@ -925,7 +927,8 @@ void UnwindFragmentInfo::FinalizeOffset() { if (ufiEmitLoc == NULL) { - ufiStartOffset = 0; // NULL emit location means the beginning of the code. This is to handle the first fragment prolog. + // NULL emit location means the beginning of the code. This is to handle the first fragment prolog. + ufiStartOffset = 0; } else { @@ -1071,7 +1074,8 @@ void UnwindFragmentInfo::MergeCodes() assert(ufiInitialized == UFI_INITIALIZED_PATTERN); unsigned epilogCount = 0; - unsigned epilogCodeBytes = 0; // The total number of unwind code bytes used by epilogs that don't match the prolog codes + unsigned epilogCodeBytes = 0; // The total number of unwind code bytes used by epilogs that don't match the + // prolog codes unsigned epilogIndex = ufiPrologCodes.Size(); // The "Epilog Start Index" for the next non-matching epilog codes UnwindEpilogInfo* pEpi; @@ -1157,7 +1161,8 @@ void UnwindFragmentInfo::MergeCodes() DWORD finalSize = headerBytes - + codeBytes; // Size of actual unwind codes, aligned up to 4-byte words, including end padding if necessary + + codeBytes; // Size of actual unwind codes, aligned up to 4-byte words, + // including end padding if necessary // Construct the final unwind information. @@ -1389,7 +1394,8 @@ void UnwindFragmentInfo::Reserve(BOOL isFunclet, bool isHotCode) // funKind: funclet kind // pHotCode: hot section code buffer // pColdCode: cold section code buffer -// funcEndOffset: offset of the end of this function/funclet. Used if this fragment is the last one for a function/funclet. +// funcEndOffset: offset of the end of this function/funclet. Used if this fragment is the last one for a +// function/funclet. // isHotCode: are we allocating the unwind info for the hot code section? void UnwindFragmentInfo::Allocate(CorJitFuncKind funKind, void* pHotCode, void* pColdCode, UNATIVE_OFFSET funcEndOffset, bool isHotCode) @@ -1618,7 +1624,8 @@ void UnwindInfo::Split() if (uwiFragmentLast->ufiEmitLoc == NULL) { - startOffset = 0; // NULL emit location means the beginning of the code. This is to handle the first fragment prolog. + // NULL emit location means the beginning of the code. This is to handle the first fragment prolog. + startOffset = 0; } else { @@ -1662,6 +1669,7 @@ void UnwindInfo::Split() // the actual offsets of the splits since we haven't issued the instructions yet, so store // an emitter location instead of an offset, and "finalize" the offset in the unwindEmit() phase, // like we do for the function length and epilog offsets. + CLANG_FORMAT_COMMENT_ANCHOR; #ifdef DEBUG if (uwiComp->verbose) |