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

Support printing of snippets before binary encoding #5111

Open
fjeremic opened this issue Apr 23, 2020 · 0 comments
Open

Support printing of snippets before binary encoding #5111

fjeremic opened this issue Apr 23, 2020 · 0 comments

Comments

@fjeremic
Copy link
Contributor

As identified in [1] by @aviansie-ben there are numerous locations such as:

trfprintf(pOutFile, "DC \t%p \t\t# ramMethod",*((intptr_t*)bufferPos));

trfprintf(pOutFile, "%02x", bufferPos[i]);

else if (*((uintptr_t*)bufferPos) == 0xe28fe004) // This is a JNI method

where we dereference the pointer where the snippet is encoded in order to print the snippet to a trace log file. This is problematic if we wish to print the snippets before binary encoding. Such a need arises if we wish to print snippets during instruction selection for example, or in downstream projects which generate diagnostic trace files for crashes during compilation (for example if we crash during instruction selection, or during binary encoding of instructions).

We need to enhance the pretty-printing logic of snippets to support printing the snippet at any point in time, similarly to how we support this for instruction objects.

[1] #5053 (comment)

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

No branches or pull requests

1 participant