Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMI arm diffs issue #143

Open
BruceForstall opened this issue Jun 20, 2018 · 2 comments
Open

PMI arm diffs issue #143

BruceForstall opened this issue Jun 20, 2018 · 2 comments

Comments

@BruceForstall
Copy link
Member

I saw this a few times in some arm altjit frameworks PMI diffs:

Base:

            movw    r3, 0xd1ff
            movt    r3, 0xd1ff
            blx     r3                   // System.Threading.Tasks.Dataflow.BatchBlock`1[__Canon][System.__Canon]:get_DebuggerDisplayContent():ref:this

diff:

            mov     r3, 0x3d8000
            blx     r3                   // System.Threading.Tasks.Dataflow.BatchBlock`1[__Canon][System.__Canon]:get_DebuggerDisplayContent():ref:this

I presume what’s happening is the addresses are different between base and diff, and we’re getting lucky to be able to encode a constant with one of arm’s wacky constant encodings. I don’t remember ever seeing this with ngen-base altjit asm diffs – presumably because the addresses always required relocs, so we always forced movw/movt encoding. This could be kind of annoying; we might have to thing about how to make this stable.

(This points out an advantage for SuperPMI diffs, where the addresses are guaranteed to be identical.)

@BruceForstall
Copy link
Member Author

One way to fix this would be to change emitter::isModImmConst to always return "false" when COMPlus_JitDiffableDasm=1. We currently never change code generation for diffable; we only elide the constant outputs. It seems like it would be ok in this case to avoid "random" diff failures.

Comments, @briansull @AndyAyersMS @dotnet/jit-contrib @dotnet/arm32-contrib ?

@AndyAyersMS
Copy link
Member

I'd prefer not to change how the jit behaves just for diffing, but I don't have any better ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants