summaryrefslogtreecommitdiff
path: root/src/vm/arm
AgeCommit message (Collapse)AuthorFilesLines
2018-07-06Remove relocations for vtable chunks (#17147)Gleb Balykov1-3/+85
* Separate sections READONLY_VCHUNKS and READONLY_DICTIONARY * Remove relocations for second-level indirection of Vtable in case FEATURE_NGEN_RELOCS_OPTIMIZATIONS is enabled. Introduce FEATURE_NGEN_RELOCS_OPTIMIZATIONS, under which NGEN specific relocations optimizations are enabled * Replace push/pop of R11 in stubs with - str/ldr of R4 in space reserved in epilog for non-tail calls - usage of R4 with hybrid-tail calls (same as for EmitShuffleThunk) * Replace push/pop of R11 for function epilog with usage of LR as helper register right before its restore from stack
2018-04-06Fix GC stress modes 4 and 8 on Linux ARM (#17456)Jan Vorlicek1-0/+2
There were two problems: * The illegal instruction 0xde01 used for INTERRUPT_INSTR_CALL doesn't generate SIGILL, but SIGTRAP, since this is the code used for breakpoints. * The USE_REDIRECT_FOR_GCSTRESS was defined even for FEATURE_PAL for ARM, which is incorrect and resulted in explicit redirect frame not being created in DoGcStress and thus the GC stack walk was skipping managed frames that it should walk.
2018-03-30Tighten arm32/arm64 write barrier kill reg setsBruce Forstall1-6/+7
The JIT write barrier helpers have a custom calling convention that avoids killing most registers. The JIT was not taking advantage of this, and thus was killing unnecessary registers when a write barrier was necessary. In particular, some integer callee-trash registers are unaffected by the write barriers, and no floating-point register is affected. Also, I got rid of the `FEATURE_WRITE_BARRIER` define, which is always set. I also put some code under `LEGACY_BACKEND` for easier cleanup later. I removed some unused defines in target.h for some platforms.
2018-03-28Fix some more unwinding in R2R ARM (#17292)Jan Vorlicek1-17/+17
There was one more change needed to make the unwinding work properly. Pushes in some prologs were missing the unwinder annotation. The fix is to use PROLOG_PUSH for them. To make things in this file consistent, I've also replaced pops in epilogs with EPILOG_POP macro and vpush / vpop with PROLOG_VPUSH / PROLOG_VPOP, although it is not functionally necessary. With these changes, all the EH related issues are gone.
2018-03-28Fix DelayLoad_MethodCall unwinding (#17275)Jan Vorlicek1-4/+4
* Fix DelayLoad_MethodCall unwinding Unwinding through DelayLoad_MethodCall was broken due to the overwriting of R7 which is used as a frame pointer. That caused some managed exceptions to cause abort with unhandled PAL_SEHException. This change fixes the problem by using a different register. * Fix one more spot with the same issue
2018-03-24Delete unused files from src/inc (#17186)Jan Kotas2-2/+0
2018-02-17delete unused mirror files (#16423)Sergey Andreenko1-1/+0
2018-01-29Perform PhysicalMemoryLimit check for workstation GC, refactor ↵Tom Deseyn1-7/+0
GetLargestOnDieCacheSize into GetCacheSizePerLogicalCpu (#15975) * refactor: combine GetLargestOnDieCacheSize and GetLogicalCpuCount in GetCacheSizePerLogicalCpu * Perform PhysicalMemoryLimit check also for workstation GC
2018-01-25Enable tiered jitting for R2R methods (#15967)Koundinya Veluri1-0/+28
Enable tiered jitting for R2R methods - Included R2R methods and generics over value types in CoreLib for tiered jitting. Tier 0 for R2R methods is the precompiled code if available, and tier 1 is selectively scheduled based on call counting. - Added a delay before starting to count calls for tier 1 promotion. The delay is a short duration after frequent tier 0 jitting stops (current heuristic for identifying startup). - Startup time and steady-state performance have improved on JitBench. There is a regression shortly following startup due to call counting and tier 1 jitting, for a short duration before steady-state performance stabilizes. - Added two new config values, one for configuring the call count threshold for promoting to tier 1, and another for specifying the delay from the last tier 0 JIT invocation before starting to count calls
2018-01-21Remove AppDomainLeaks configuration option (#15956)antofik1-5/+0
Removed all usages of AppDomainLeaks configuration option and CHECK_APP_DOMAIN_LEAKS feature Fix #12094
2018-01-12Improve UMEntryThunkCode::Poison method.Konstantin Baladurin1-2/+12
Improve UMEntryThunkCode::Poison to produce diagnostic message when collected delegate was called.
2017-11-18Delete unused Thread::YieldTask (#15091)Jan Kotas2-4/+0
2017-10-27Implemented TailCall ELT hook for arm32 Linux (#14713)Roman Artemev2-10/+48
* Added TailCall ELT hook for arm32 Linux * fixed review
2017-10-17[RyuJIT/ARM32] Add the optimization case on CreateDictionaryLookupHelper ↵Sujin Kim1-6/+111
(#13933) * Implement optimization case for CreateDictionaryLookupHelper Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com> * Reenable mainv1/mainv2 tests
2017-10-11Delete !FEATURE_IMPLICIT_TLS (#14398)Jan Kotas6-787/+58
Linux and Windows arm64 are using the regular C/C++ thread local statics. This change unifies the remaining Windows architectures to be on the same plan.
2017-09-29StompWriteBarrier initialization path refactoring (#14105)Sergey1-12/+16
* refactored arm, arm64, amd64 and x86 to signal about icache flush and ee restarts * refactored gc init stage to stomp write barrier (hence flush icache) only once * review fixes, care taken of icache invalidation during StompResize * fixed heap boundaries initialization bug introduced after refactoring gc.cpp * stylistic review fixe * global variable rename * global variable rename once more
2017-09-12[RyuJIT/ARM32] Implement CreateDictionaryLookupHelper only via helper (#13733)Sujin Kim1-5/+28
* [RyuJIT/ARM32] Implement CreateDictionaryLookupHelper only via run-time helper Implement CreateDictionaryLookupHelper only via run-time helper * Add assertion for checking CORINFO_USEHELPER
2017-08-14[Linux/ARM] Fix managed breakpoints (#13316)Igor Kulaychuk2-2/+14
* [Linux/ARM] Fix managed breakpoints This commit introduces the following changes in order to enable ICorDebug-based debuggers to use breakpoints on ARM Linux: * Use 0xde01 as breakpoint instruction on ARM Linux. ARM reference recommends to use 0xdefe as a breakpoint instruction, but Linux kernel generates SIGILL for this instruction. The 0xde01 instruction causes the kernel to generate SIGTRAP. * Fix SIGTRAP handling on ARM Linux. Unlike x86, when SIGTRAP happens on ARM Linux, the PC points at the break instruction. But the rest of the code expects that it points to an instruction after the break, so we adjust the PC at the start of HandleHardwareException(). * Enable ARM single stepping for PAL. Handle single stepping for PAL path the same way as for non-PAL path. Also enable ArmSingleStepper executable buffer by allocating it from system global loader executable heap. * Hande ARM single step only when debugger is attached, fix comments and code style * Pass existing Thread object to HandleArmSingleStep
2017-08-07Cleanup code access security from the unmanaged runtime (#13241)Jan Kotas1-1/+0
2017-08-02Use 'udf 0xff' instead of 'bkpt 0xbe' as a poison (#13152)Jonghyun Park1-2/+2
2017-07-31 Fill freed loader heap chunk with non-zero value (#12731)Jonghyun Park2-0/+7
* Add FEATURE_LOADER_HEAP_GUARD feature * Invoke memset only for reclaimed regions * Enable FEATURE_LOADER_HEAP_GUARD by default * Insert trap inside UMEntryThunk::Terminate * Make all exectuable heaps not to zero-initialize itself Use fZeroInit (instead of fMakeRelazed) * Add comment * Revert unnecessary changes * Add and use 'Poison' method to insert a trap * Do NOT invoke FlushInstructionCache * Update comment * Add comment on ARM Poisoning instruction * Use X86_INSTR_INT3 instead of 0xCC
2017-06-26Replace array type handle with method table in arguments of array allocation ↵Ruben Ayrapetyan3-38/+11
helpers (#12369) * Remove direct usage of type handle in JIT_NewArr1, with except of retrieving template method table. * Assert that array type descriptor is loaded when array object's method table is set. * Pass template method tables instead of array type descriptors to array allocation helpers.
2017-06-09[ARM/Linux] Validate memory using ldrb instead of ldr (#12191)Jonghyun Park1-2/+2
2017-05-17Finish deleting dead CAS code from CoreLib (#11436)Jan Kotas1-1/+0
Fixes #9321 and deletes CleanupToDoList.cs Delete unmanaged security implementation
2017-05-05Add compact entry points for ARM (#11109)gbalykov4-1/+100
2017-03-16[Local GC] Break EE dependency on GC's generation table and alloc lock in ↵Sean Gillespie1-1/+1
single-proc scenarios (#10065) * Remove usage of the generation table from the EE by introducing an EE-owned GC alloc context used for allocations on single-proc machines. * Move the GC alloc lock to the EE side of the interface * Repair the Windows ARM build * Move the decision to use per-thread alloc contexts to the EE * Rename the lock used by StartNoGCRegion and EndNoGCRegion to be more indicative of what it is protecting * Address code review feedback 2 (enumerate the global alloc context as a part of GCToEEInterface) * Code review feedback (3) * Address code review feedback (move some GC-internal globals to gcimpl.h and gc.cpp) * g_global_alloc_lock is a dword, not a qword - fixes a deadlock * Move GlobalAllocLock to gchelpers.cpp and switch to preemptive mode when spinning * Repair the Windows x86 build
2017-03-01[x86/linux] Add IsIPinVirtualStub() on x86/linux (#9844)Yongseop Kim2-33/+0
* [x86/linux] Add IsIPinVirtualStub() on x86/linux #9691 To pass Loader.classloader.methodoverriding.regressions.549411.exploit test failure on x86/linux. This patch is from #5542.
2017-02-26Clean up PInvokeStubForHost and PInvokeStubForHostInner (#9815)Jonghyun Park2-11/+0
2017-02-24Remove NakedThrowHelper and ifdef-out its callers (#9771)Jan Vorlicek1-21/+0
This change removes NakedThrowHelper function for Unix since it was not used. It also ifdefs out its upstream callers.
2017-02-24[Linux/ARM,ARM64] Fix undefined FixContextHandler issue (#9755)Jonghyun Park1-1/+1
2017-02-14Remove never defined FEATURE_REMOTINGdanmosemsft5-677/+4
2017-02-14Remove never defined FEATURE_MIXEDMODEdanmosemsft1-40/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-2/+0
2017-01-12Add clang 3.7 support and remove __FakePrologName to fix build (#8904)Maarten Mensink1-2/+0
* add clang 3.7 support * Removing __FakePrologName="DelayLoad_Helper\suffix\()_FakeProlog" based on https://github.com/dotnet/coreclr/issues/4332#issuecomment-271990909
2016-09-29Set THUMB bit for RUNTIME_FIXUP_HELPER functions (#7373)Jonghyun Park1-3/+3
* Appends THUMB bit for RUNTIME_FIXUP_HELPER address * Revise GetEEFuncEntryPoint (for ARM) and use it to set thumb bit * Uses GetEEFuncEntryPoint instead of GFN_TADDR
2016-09-08Merge pull request #6764 from swgillespie/gc-interface-3Sean Gillespie2-3/+3
Move the GC behind an interface and use that interface in the VM
2016-09-08Introduce an interface separating the GC and the VM,Sean Gillespie2-3/+3
modifying the VM to utilize this interface. Introduce an interface separating the GC and the rest of the VM Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM. Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC. Split each interface function into categories, document them, use consistent formatting across the interface Undo some accidental find/replace collateral damage Remove all ifdefs from the GC interface Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build Paper cut: false -> nullptr Repair the ARM and x86 builds Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback Rebase against master Rename gcholder.h/cpp -> gcheaputilities.h/cpp Fix an uninitialized field on alloc_context causing test failures on clang Rename the include guard for gcheaputilities.h Un-breaks SOS by making the following changes: 1) Instructs the DAC to look for IGCHeap::gcHeapType by name, instead of assuming that it exists near g_pGCHeap, 2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot dispatch on an object in another process, 3) Because of 2, expose the number of generations past the GC interface using a static variable on IGCHeap that the DAC can read directly. repair the Windows build
2016-09-02Merge pull request #6976 from kvochko/prof_elt_callbacksRahul Kumar2-10/+86
Enable FunctionEnter/FunctionLeave callbacks on ARM
2016-09-02Enabled FunctionEnter/FunctionLeave hooks on ARM (#6939)Andrey Kvochko2-10/+86
2016-08-29Revises UMThunkStub unwindable in ARM/Linux (#6788)Jonghyun Park1-5/+6
In ARM/Linux, UMThunkStub currently pushes r0-r3 and r12 without .pad, which results in #6787. This commit revises the prolog and epilog of UMThunkStub to fix 6787. (In addition, personality routine is addes as ARM64/AMD64 already does.)
2016-08-23Initial commit to build Win32 Arm CoreCLRGaurav Khanna2-1/+5
2016-08-16Makes FCallMemcpy unwindable (#6753)Jonghyun Park1-4/+7
FCallMemcpy function in vm/arm/memcpy.S creates an stack frame that libunwind cannot recognize, which leads to the issue in #6752. This commit makes the stack frame of FCallMemcpy unwindable to fix issue #6752.
2016-08-08Fix for missing symbol OnHijackTripThreadjashoo1-14/+1
PR #6522 changed from OnHijackScalarTripThread to OnHijackTripThread; however, missed changing this definition for arm windows.
2016-08-07Check PAL_VirtualUnwind failure during GC (#6598)Jonghyun Park1-1/+6
As discussed in #6525, PAL_VirtualUnwind sometimes fails during GC. This GC failure leads to very unpredicatble behavior (which is very hard to analyze). This commit tries to stop the execution at the point where error happens.
2016-08-05Implement GcInfo v2Swaroop Sridhar3-51/+10
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-06-24Fix Issue #5542 (#5827)chunseoklee2-0/+33
On arm32, NullReference exception for interface call is not handled properly. Especially, when callsite is a virtualstub(dispatch/resolve), AV exception occurs on indirect cell. Since this stub is not a part of managed or markedjithelper, exception handler considers this is a native seg fault. I added : (1) FaultingExceptionFrame construction routine for virtualstub (2) Checking and IP-adjusting routine for VirtualStub
2016-06-23Enable out-of-proc unwinding on ARM (#5946)kvochko1-1/+8
Fix #5855
2016-06-21Fixing build break on x86 and arm.Fadi Hanna1-1/+1
[tfs-changeset: 1614031]
2016-06-17Use Use LEAF_END_MARKED instead of LEAF_END for various functions (#5849)Jonghyun Park2-5/+5
This commit fixes #5848.
2016-06-09ARM64: Don't track LR as part of NV-ContextSwaroop Sridhar1-1/+1
The _pc and _sp fields actually refer to the caller's PC and SP values. So, remove read/writes of LR in captureX19_X29 array of ARM64 MachState. This change fixes a buffer overflow problem.