From d13ba3b4d839d6215d9193dabc497967afb3138e Mon Sep 17 00:00:00 2001 From: Manu Date: Fri, 19 Feb 2016 09:35:14 +0900 Subject: [PATCH 1/2] Fixed typo causing a C compilation error on 32-bit. --- src/Native/Runtime/portable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Native/Runtime/portable.cpp b/src/Native/Runtime/portable.cpp index 670a76b12b8..2bb3b0775ac 100644 --- a/src/Native/Runtime/portable.cpp +++ b/src/Native/Runtime/portable.cpp @@ -156,7 +156,7 @@ COOP_PINVOKE_HELPER(Array *, RhpNewArray, (EEType * pArrayEEType, int numElement { // Perform the size computation using 64-bit integeres to detect overflow uint64_t size64 = (uint64_t)pArrayEEType->get_BaseSize() + ((uint64_t)numElements * (uint64_t)pArrayEEType->get_ComponentSize()); - size64 = ALIGN_UP(size, sizeof(UIntNative)); + size64 = ALIGN_UP(size64, sizeof(UIntNative)); size = (size_t)size64; if (size != size64) From 811c3b9bc55f3ff68e1644c8c4f9e3100fa39b3c Mon Sep 17 00:00:00 2001 From: Manu Date: Fri, 19 Feb 2016 09:44:59 +0900 Subject: [PATCH 2/2] Enable C compilation for Arm/Arm64 The Arm64 is not yet successfully compiling, a lot more work is required. --- src/Native/CMakeLists.txt | 6 ++++-- src/Native/Runtime/arm/StubDispatch.S | 7 +++++++ src/Native/Runtime/arm64/StubDispatch.S | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/Native/Runtime/arm/StubDispatch.S create mode 100644 src/Native/Runtime/arm64/StubDispatch.S diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt index 83ccad224f1..600a4376d03 100644 --- a/src/Native/CMakeLists.txt +++ b/src/Native/CMakeLists.txt @@ -90,8 +90,10 @@ if (CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-Wno-null-arithmetic) add_compile_options(-Wno-null-conversion) - # Allow 16 byte compare-exchange - add_compile_options(-mcx16) + if (CLR_CMAKE_PLATFORM_UNIX_TARGET_AMD64) + # Allow 16 byte compare-exchange + add_compile_options(-mcx16) + endif() # Disable strict warning on unused functions. add_compile_options(-Wno-unused-function) diff --git a/src/Native/Runtime/arm/StubDispatch.S b/src/Native/Runtime/arm/StubDispatch.S new file mode 100644 index 00000000000..de818954b6a --- /dev/null +++ b/src/Native/Runtime/arm/StubDispatch.S @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#include + +// TODO: Implement Arm support diff --git a/src/Native/Runtime/arm64/StubDispatch.S b/src/Native/Runtime/arm64/StubDispatch.S new file mode 100644 index 00000000000..a6615339ed5 --- /dev/null +++ b/src/Native/Runtime/arm64/StubDispatch.S @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#include + +// TODO: Implement Arm64 support