summaryrefslogtreecommitdiff
path: root/src/vm/arm64/asmhelpers.asm
AgeCommit message (Collapse)AuthorFilesLines
2016-09-02Implement FixupPrecode for Arm64Rama Krishnan Raghupathy1-2/+18
2016-08-15update GC shadow heap as part of writebarrier jit helperRahul Kumar1-0/+51
2016-08-11Merge pull request #6691 from ramarag/ResolveWorkerChainLookupAsmStubFixRama krishnan Raghupathy1-7/+8
Preserving ResolveCacheElem in X9
2016-08-10Preserving ResolveCacheElem in X9Rama Krishnan Raghupathy1-7/+8
2016-08-10ARM64: Fix for ARM64TODORahul Kumar1-16/+44
2016-08-05Implement GcInfo v2Swaroop Sridhar1-55/+3
Ref #4379 This change implements GcInfo version 2 for all platforms that use the GcInfo library (all architectures other than X86). Changes are: 1) Defines ReturnKind enumeration for all platforms 2) Change the GcInfo encoder library to encode the ReturnKind and ReversePInvokeFrame slot 3) Change the CM's GcInfo decoder to encode the ReturnKind and ReversePInvokeFrame slot for GCINFO_VERSION 2 4) Some corrections to GCINFO_MEASUREments 5) Changes to RYU Jit to provide the correct information to the encoder 6) Changes to the VM to use the ReturnKind information while hijacking a thread - If ReturnKind is available from GcInfo, new hijack routines are used - Otherwise, fall back to old method (for compatibility) 7) Rework and simplify the thread hijack routines by scanning HijackFrames directly for gcroots 8) Supporting code to implement the above features. Returning Structs in multiple registers Hijacking for StructInRegs is currently only implemented for Unix SystemV ABI Multi-reg struct returns. However, the hijack-workers that use ReturnKind are ready to handle other platforms (ex: ARM/ARM64 Windows) once the corresponding HijackTripThread() assembly routines are defined. The New feature flag: FEATURE_MULTIREG_RETURN is set for platforms where a struct value can be returned in multiple registers [ex: Windows/Unix ARM/ARM64, Unix-AMD64] FEATURE_UNIX_AMD64_STRUCT_PASSING is a specific kind of FEATURE_MULTIREG_RETURN specified by SystemV ABI for AMD64 Compatibility with other JITs - All new GCInfo generated by RYU Jit is in GcInfo version 2 - All Ngen images must be regenerated with the new GcInfo version. - Ready-to-run images with old GcInfo will continue to work. - Jit64/X64 uses the GcInfo library, so it generates GcInfo version 2. However, it doesn't (yet) provide the data to encode the correct ReturnKind Similar is the case for ARM32 code running on JIT32, and any other JITs that may be using GcInfo library but not yet modified to use the new API. So, compatibility is achived using RT_Unset flag. When ReturnKind is RT_Unset, it means that the JIT did not set the ReturnKind in the GCInfo, and therefore the VM cannot rely on it, and must use other mechanisms (similar to GcInfo ver 1) to determine the Return type's GC information. Implement GC root scanning for Hijack-frames This change implements GCScanRoots() method for Hijacke-frames based on the ReturnKind information available from the GcInfo. If the exact ReturnKind is not available in the GcInfo, the thread-suspension logic will compute the ReturnKind based on the method-signature. As a result of this change, several hijack-helpers in the VM are cleaned up. There's only one implementation of HijackWorker() to handle all returnKinds. This change also simplifies the thread-hijack logic by using a single assembly helper OnHijackTripThread() in most cases. The only other helper used is for X86 floating point return values for save/restoring the top of the FP stack. ARM64 Only GcIndfo v2 is reliably supported for ARM64 platform. The changes to thread-hijack mechanism fixes #6494 for ARM64. No measurable change in JIT throughput, performance or native-image size from this change.
2016-07-26Enable multireg returns on Arm64Brian Sullivan1-9/+17
Added method IsMultiRegPassedType and updated IsMultiRegReturnType Switched these methods to using getArgTypeForStruct and getReturnTypeForStruct Removed IsRegisterPassable and used IsMultiRegReturned instead. Converted lvIsMultiregStruct to use getArgTypeForStruct Renamed varDsc->lvIsMultiregStruct() to compiler->lvaIsMultiregStruct(varDsc) Skip calling getPrimitiveTypeForStruct when we have a struct larger than 8 bytes Refactored ReturnTypeDesc::InitializeReturnType Fixed missing SPK_ByReference case in InitializeReturnType Fixes for RyiJIt x86 TYP_LONG return types and additional ARM64 work for full multireg support Added ARM64 guard the uses of MAX_RET_MULTIREG_BYTES with FEATURE_MULTIREG_RET Fixes for multireg returns in Arm64 Codegen Added dumping of lvIsMultiRegArg and lvIsMultiRegRet in the assembly output Added check and set of compFloatingPointUsed to InitializeStructReturnType Fixes to handle JIT helper calls that say they return a TYP_STRUCT with no class handle available Placed all of the second GC return reg under MULTIREG_HAS_SECOND_GC_RET ifdefs Added the Arm64 VM changes from Rahul's PR 5175 Update getArgTypeForStruct for x86/arm32 so that it returns TYP_STRUCT for all pass by value cases Fixes for the passing of 3,5,6 or 7 byte sized structs Fix issue on ARM64 where we would back fill into x7 after passing a 16-byte struct on the stack Implemented register shuffling for multi reg Call returns on Arm64 Fixed regression on Arm32 for struct args that are not multi regs Updated Tests.Lst with 23 additional passing tests Changes from codereview feedback
2016-06-21Arm64:return buffer arg should be passed in x8Rahul Kumar1-35/+48
2016-06-16ARM64: Fix WriteBarrierKyungwoo Lee1-1/+2
I think this finally fixes most of long outstanding GC issues that appear in different forms so far that include #4877, #4879, #4890 and more. The issues was WriteBarrier implementation. When we update card table, the address has been already incremented by 8. With this fix, all corefx tests seem to run on xunit framework without crashing. I verified this with an out-of-date build locally, so there are not found assembly errors like System.Runtime.Extensions with different versions, though. These are what I tested so far that safely finished all runs with very high percentage of pass. System.Collections.Tests System.Dynamic.Runtime.Tests System.Linq.Expressions.Tests System.Linq.Parallel.Tests Potentially more coreclr tests will pass. I will update them as tests go.
2016-04-29ARM64: Enabling Crossgen End-to-End MscorlibKyungwoo Lee1-1/+24
Fixes https://github.com/dotnet/coreclr/issues/4350 Fixes https://github.com/dotnet/coreclr/issues/4615 This is a bit large change across VM/Zap/JIT to properly support crossgen scenario. 1. Fix incorrect `ldr` encoding with size. 2. Enforce JIT data following JIT code per method by allocating them together. This guarantees correct PC-relative encoding for such constant data access without fix-up. 3. For the general fix-up data acceess, use `adrp/add` instruction pairs with fix-ups. Two more relocations types are implemented in all sides. 4. Interface dispatch stub is now implemented which is needed for interface call for crossgen. I've verified hello world runs with mscorlib.ni.dll.
2016-04-28Enable ReadyToRun feature for arm64Rahul Kumar1-1/+50
2016-04-12ARM64: Fix for recording SP for handler.Kyungwoo Lee1-1/+2
Fixes https://github.com/dotnet/coreclr/issues/3701. When GC occurs in a catch handler, we compare the current frame with the one saved before the funclet was invoked. The recorded SP address was wrong (offset by 16 byte), which caused FindParentStackFrameForStackWalk to null frame. So, we ended up with assert on `ExceptionTracker::HasFrameBeenUnwoundByAnyActiveException(&m_crawl)`. The issue was assembly helper, CallEHFunclet records FP instead of SP while SP is adjusted in prolog.
2016-04-08[Arm64]:Fixing the Logic of ResolveWorkerChainLookupAsmStubRama Krishnan Raghupathy1-4/+4
2016-03-23offset in epilog to match as prologRahul Kumar1-1/+1
2016-03-22ARM64: Implementation of Thread hijacking and thread redirection required ↵Rahul Kumar1-4/+88
for GCSuspension
2016-02-29Fixes issue #2643 and #2731Rahul Kumar1-8/+8
2016-01-27Update license headersdotnet-bot1-4/+3
2015-12-11Port of all JIT changes for .NET Framework 4.6.1 changesBrian Sullivan1-31/+92
http://blogs.msdn.com/b/dotnet/archive/2015/11/30/net-framework-4-6-1-is-now-available.aspx .NET Framework list of changes in 4.6.1 https://github.com/Microsoft/dotnet/blob/master/releases/net461/dotnet461-changes.md Additional changes including - Working ARM64 JIT compiler - Additional JIT Optimizations o Tail call recursion optimization o Array length tracking optimization o CSE for widening casts o Smaller encoding for RIP relative and absolute addresses in addressing modes o Tracked Local Variable increased to 512 o Improved handling of Intrinsics System.GetType() o Improved handling of Math intrinsics - Work for the X86 Ryu-JIT compiler [tfs-changeset: 1557101]
2015-07-30Fix more build breaks on Windows arm64Jan Kotas1-0/+7
[tfs-changeset: 1508010]
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+1024
[tfs-changeset: 1407945]