Skip to content

Conversation

@kunalspathak
Copy link
Contributor

@kunalspathak kunalspathak commented Nov 28, 2021

GDB expects the brk instruction to be brk #0 on Linux and windows debugger expect brk #F000 on Windows. Although the immediate is different, both are of form brk #immediate which are of same format. We were having outdated bkpt instruction name for brk #F000 encoding. Instead rename it to brk_windows and brk_unix to clearly distinguish the two.

See discussion in #61944 (comment).

This also fixes an issue where we would accidently (under stress mode) emit brk instruction for an align that is not placed after jmp. Example in #61944 (comment)

Fixes: #61944, #61824

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 28, 2021
@ghost
Copy link

ghost commented Nov 28, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@kunalspathak kunalspathak changed the title Always use int3/bkpt Always use int3/bkpt/brk for align that falls after jump Nov 29, 2021
@kunalspathak kunalspathak changed the title Always use int3/bkpt/brk for align that falls after jump Use the right format of bkpt/brk for align that falls after jump Nov 30, 2021
@kunalspathak kunalspathak marked this pull request as ready for review November 30, 2021 19:56
@kunalspathak
Copy link
Contributor Author

@dotnet/jit-contrib

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

arm64 jitstress failing with encoding_found assert

2 participants