Uh oh!
There was an error while loading. Please reload this page.
Support for ARM64 on UNIX like systems compiler and runtime - #8271
Conversation
Sync to Head
On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants
* CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception
Update to master
Update from master
* CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception
This reverts commit 6c9e235.
* CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 formating * ARM64: revert using alternative JIT * Revert "ARM64 unix stack walk" This reverts commit 6c9e235.
This reverts commit c68cea1.
MichalStrehovsky
left a comment
There was a problem hiding this comment.
Looked at the AOT compiler changes so far, but looks great!
I'll look at the rest a bit later.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit 37ce540.
* CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 formating * ARM64: revert using alternative JIT * Revert "ARM64 unix stack walk" * ARM64 review reworks
Arm64: Fix function call for pinvoke result
Data is updated with a compare exchange operation. Therefore it needs to be aligned or it will trigger a data exception on ARM64 CPUs
ARM64: Ensure module fixup node data is aligned
jkotas
left a comment
There was a problem hiding this comment.
This looks great otherwise! Thank you!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MichalStrehovsky
left a comment
There was a problem hiding this comment.
Didn't look at the assembly helpers in detail, but the rest looks good! Thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Aug 27, 2020
@RalfKornmannEnvision Thank you again for this contribution! We really appreciate it. |
* Fix alignment of marshaled inline arrays (dotnet#8275) Fixesdotnet#8274 * Correct flags for allocating in RhpNewFastMisalign. Add fast path (dotnet#8277) * add switch case for LPUTF8Str in array element (dotnet#8278) * Wasm: Add support for DefaultConstructorOf and hence Activator.CreateInstance<T> (dotnet#8279) * Wasm: upgrade emscripten for an llvm and exception fixes. (dotnet#8281) * upgrade emscripten for some llvm and exception fixes. Correct retrieval of exception from landing pad. end c++ exception when catch found. * Update ILToWebAssemblyImporter.cs remove cut/past comment * Wasm: add support for new StackTrace().ToString() (dotnet#8201) * wasm add rethrow support (dotnet#8206) * Wasm: add support for overflow checks on signed and unsigned ints multiply (dotnet#8259) * wasm-ovf-unsigned-int * refactor for stack kind tests and add signed check * use llvm intrinsics * Wasm: bring add and sub overflow operations in line with mul (dotnet#8284) * Support for ARM64 on UNIX like systems compiler and runtime (dotnet#8271) * CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implementations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decoding * Move native layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the generic helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 Fix wrong function call for invoke return * ARM64: Ensure module fixup node data is aligned Data is updated with a compare exchange operation. Therefore it needs to be aligned or it will trigger a data exception on ARM64 CPUs * Wasm fix LLVM Debug Information subroutine linkage (dotnet#8288) * wasm - reinstate llvm debug subroutine linkage Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: yowl <scott.waye@hubse.com>
* Arm64 (#5) * CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * Arm64 (#6) * CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 formating * ARM64: revert using alternative JIT * Revert "ARM64 unix stack walk" This reverts commit 6c9e235. * Arm64 (#7) * CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implemenations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decodeing * Move nattive layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the gemeric helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 formating * ARM64: revert using alternative JIT * Revert "ARM64 unix stack walk" * ARM64 review reworks * Arm64: review reworks (#10) * Arm64 (#11) * ARM64: remove left over code * Update src/Native/Runtime/arm64/WriteBarriers.S * Sync to head (#12) * Fix alignment of marshaled inline arrays (dotnet#8275) Fixesdotnet#8274 * Correct flags for allocating in RhpNewFastMisalign. Add fast path (dotnet#8277) * add switch case for LPUTF8Str in array element (dotnet#8278) * Wasm: Add support for DefaultConstructorOf and hence Activator.CreateInstance<T> (dotnet#8279) * Wasm: upgrade emscripten for an llvm and exception fixes. (dotnet#8281) * upgrade emscripten for some llvm and exception fixes. Correct retrieval of exception from landing pad. end c++ exception when catch found. * Update ILToWebAssemblyImporter.cs remove cut/past comment * Wasm: add support for new StackTrace().ToString() (dotnet#8201) * wasm add rethrow support (dotnet#8206) * Wasm: add support for overflow checks on signed and unsigned ints multiply (dotnet#8259) * wasm-ovf-unsigned-int * refactor for stack kind tests and add signed check * use llvm intrinsics * Wasm: bring add and sub overflow operations in line with mul (dotnet#8284) * Support for ARM64 on UNIX like systems compiler and runtime (dotnet#8271) * CoreRT-ARM64: Helper node asm code generation * CoreRT ARM64: Add additional relocation support * CoreRT ARM64: Use alternative functions for write Barriers On ARM the Jit uses a special register interface for to call the write barrier functions. But as the regular once still used in other places we need two different implementations. The helper nodes need to call the custom variants * ARM64 code generation * unwind use only the dwarf index option * ARM64 runtime assembler functions * ARM64 unix stack walk * ARM64 Exception Handling * ARM64: Fix EH data decoding * Move native layout signature from read only to data section on non Windows target * Fix exception handling macro call * ARM64 thunk helpers * ARM64 process cfi data for elf * ARM64 missing assembler macro * ARM64 port more assembler helpers * ARM64: Add missing case for the generic helper node * ARM64 intrinsic support * ARM64 object writer for ELF object files * ARM64 llvm patches for object writer * ARM64 include untested helper code with debug break * ARM64 reenable scanning fail exception * ARM64 Fix wrong function call for invoke return * ARM64: Ensure module fixup node data is aligned Data is updated with a compare exchange operation. Therefore it needs to be aligned or it will trigger a data exception on ARM64 CPUs * Wasm fix LLVM Debug Information subroutine linkage (dotnet#8288) * wasm - reinstate llvm debug subroutine linkage Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: yowl <scott.waye@hubse.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: yowl <scott.waye@hubse.com>
Implements most of the missing parts for ARM64 on UNIX like hosts.