Skip to content

Arm64 late disassembler fails to disassemble some unit test instructions #96506

Open

Description

@BruceForstall

Generating all arm64 unit tests and disassembling with the coredistools (version 1.4.0; LLVM 17.0.6) based late disassembler shows a number of errors where coredistools cannot decode the generated instructions.

These should be investigated to determine if coredistools has bugs or if the JIT has bugs.

Repro:

set DOTNET_JitLateDisasm=*
set DOTNET_JitEmitUnitTests=*
set DOTNET_JitEmitUnitTestsSections=all
// Then use superpmi.exe to generate code for a single method, e.g.:
c:\gh\runtime2\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root\superpmi.exe -c 1 -target arm64 c:\spmi\mch\a19264d9-82b9-4aa4-833f-ee4b52352d7e.windows.arm64\benchmarks.run.windows.arm64.checked.mch

Failures (edited, to show only the failures with just a little context):

e60: 28 7d 0a 1b	mul	w8, w9, w10
e64: 28 fd 0a 1b	mneg	w8, w9, w10
e68: 28 7d 2a 9b	smull	x8, w9, w10
Decode Failure @ offset      e6c
e6c: 28 fd 2a 1b
Decode Failure @ offset      e70
e70: 28 7d 4a 1b
e74: 28 7d aa 9b	umull	x8, w9, w10
Decode Failure @ offset      e78
e78: 28 fd aa 1b
Decode Failure @ offset      e7c
e7c: 28 7d ca 1b
e80: 28 21 ca 1a	lsl	w8, w9, w10
e84: 28 25 ca 1a	lsr	w8, w9, w10

1328: e8 7b 29 38	strb	w8, [sp, x9, lsl #0]
132c: 80 29 1b 1b	madd	w0, w12, w27, w10
1330: a1 ad 1c 1b	msub	w1, w13, w28, w11
Decode Failure @ offset     1334
1334: c2 31 20 1b
Decode Failure @ offset     1338
1338: e3 b5 21 1b
Decode Failure @ offset     133c
133c: 64 3a a2 1b
Decode Failure @ offset     1340
1340: 85 be a3 1b
1344: a6 4e 04 9b	madd	x6, x21, x4, x19
1348: c7 d2 05 9b	msub	x7, x22, x5, x20

3558: 61 b0 c9 44	sqneg	z1.d, p4/m, z3.d
355c: 82 ac 80 44	urecpe	z2.s, p3/m, z4.s
3560: a3 a0 81 44	ursqrte	z3.s, p0/m, z5.s
Decode Failure @ offset     3564
3564: 00 28 bb 45
Decode Failure @ offset     3568
3568: 00 08 bb 45
Decode Failure @ offset     356c
356c: 00 38 bb 45
Decode Failure @ offset     3570
3570: 40 28 b0 45
Decode Failure @ offset     3574
3574: 80 08 b9 45
Decode Failure @ offset     3578
3578: c0 38 bf 45
Decode Failure @ offset     357c
357c: 1e 2a b0 45
Decode Failure @ offset     3580
3580: 10 09 b9 45
Decode Failure @ offset     3584
3584: 8f 39 bf 45
3588: 00 88 2d 25	decp	x0, p0.b
358c: 21 88 6d 25	decp	x1, p1.h

36c4: 80 54 60 45	sqxtunt	z0.s, z4.d
36c8: 23 49 60 45	uqxtnb	z3.s, z9.d
36cc: 60 4c 60 45	uqxtnt	z0.s, z3.d
Decode Failure @ offset     36d0
36d0: 00 e4 22 45
Decode Failure @ offset     36d4
36d4: 41 e0 22 45
Decode Failure @ offset     36d8
36d8: a3 e0 23 45
Decode Failure @ offset     36dc
36dc: 00 e4 20 45
Decode Failure @ offset     36e0
36e0: 05 e0 20 45
36e4: f5 3c 40 65	faddv	h21, p7, z7.h
36e8: d6 38 44 65	fmaxnmv	h22, p6, z6.h

@dotnet/arm64-contrib @a74nh

Activity

  1. added
    area-CodeGen-coreclr
    on Jan 4, 2024
  2. added this to the 9.0.0 milestone on Jan 4, 2024
  3. added
    Priority:2
    on May 6, 2024
  4. modified the milestones: 9.0.0, Future on Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2arch-arm64area-CodeGen-coreclr

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions