runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[ARM/linux] Unit test for ARM32

Open hseok-oh opened this issue 10 years ago • 3 comments

I use unit test based on below guide https://github.com/dotnet/coreclr/blob/master/Documentation/building/unix-test-instructions.md

Some tests have architecture-specific issue. For example,

JIT/Methodical/ELEMENT_TYPE_IU/_il_dbgi_array_merge

uses CIL assembly code for 64bit environment

ldelem.i
...
ldelem.i8
...
ceq

"ldelem.i" push 32bit value on top of stack in x86/arm and 64bit value in x64/arm64. This test fails in 32bit ARM because 'ceq' operation compare 32bit value with 64bit value.

JIT/Methodical/ELEMENT_TYPE_IU/_il_dbgsizeof
JIT/Methodical/ELEMENT_TYPE_IU/_il_dbgu_array_merge
JIT/Methodical/ELEMENT_TYPE_IU/_il_reli_array_merge
JIT/Methodical/ELEMENT_TYPE_IU/_il_relsizeof
JIT/Methodical/ELEMENT_TYPE_IU/_il_relu_array_merge

These have similar problem. So we need to compile assembly code and use excutable for 32bit environment.

And CoreCLR cannot support some unittest now. (#6231, dotnet/runtime#6297) In my opinion, we need additional guidance for ARM 32bit unit test build in https://github.com/dotnet/coreclr/blob/master/Documentation/building/unix-test-instructions.md .

hseok-oh avatar Jul 13 '16 05:07 hseok-oh

dotnet/coreclr#4953 is related to this issue, I think.

wateret avatar Jul 13 '16 05:07 wateret

@hseok-oh I think this issue can be approach in two ways.

  • (1) Enable building unit test for ARM 32-bit. (which I presume your thought, right?)
  • (2) Enable building unit test for 32-bit architectures where native int is 32-bit, because ldelem.i is decribed as below.

ldelem.i - Load the element with type native int at index onto the top of the stack as a native int (Source: ECAM-355 6th ed., page 403)

I also prefer (1) Enabling building unit test for ARM32, since there are other unix tests issues specific to ARM32, such as dotnet/runtime#6297 and dotnet/runtime#6302 which addresses lack of some feature in coreclr for ARM32 architecture.

BTW, All above six tests built for x86 are passed on arm-softfp/Linux. Thanks!

hqueue avatar Jul 13 '16 07:07 hqueue

I think this issue is obsolete, so I am closing it.

BruceForstall avatar Apr 25 '18 00:04 BruceForstall