Skip to content

Conversation

@matthewhall2
Copy link
Contributor

@matthewhall2 matthewhall2 commented Dec 5, 2025

Refactors ARM64HelperCallSnippet::emitSnippetBody so that the helper call emission logic can be used by downstream projects.

Removes deprecated TR_Debug::print for ARM64HelperCallSnippet and replaces with newer TR::ARM64HelperCallSnippet::print
- TR::ARM64HelperCallSnippet::printInner to be used by downstream projects

must be merged before eclipse-openj9/openj9#23085. This should not require a coordinated merge.

Copy link
Contributor

@0xdaryl 0xdaryl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic and spirit of this PR generally looks good. Three additional things:

  1. Consider a commit/PR message more descriptive of what this PR is doing, something like:

Refactor ARM64HelperCallSnippet::emitSnippetBody() to allow the helper call emission logic to be shared with downstream projects.

  1. In the commit/PR titles, change ARM to ARM64.

  2. Please fix the ClangFormat errors

uint8_t *TR::ARM64HelperCallSnippet::emitSnippetBody()
{
uint8_t *cursor = cg()->getBinaryBufferCursor();
uint8_t *TR::ARM64HelperCallSnippet::emitSnippetBodyHelper(uint8_t *cursor)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We often use the term Inner in these contexts when the guts of a function are refactored like this: emitSnippetBodyInner

Your term Helper in this context is a bit confusing in light of the fact this snippet is about emitting Helper calls. Unless there is a deeper connection here that I am missing.

@matthewhall2 matthewhall2 force-pushed the dispatchJ9Method_MH_aarch64 branch from 619c9d0 to 5f95046 Compare December 9, 2025 20:15
@matthewhall2 matthewhall2 requested a review from 0xdaryl December 9, 2025 20:17
@matthewhall2 matthewhall2 changed the title Refactor ARMHelperCallSnippet emitSnippetBody Refactor ARM64HelperCallSnippet Dec 9, 2025
@matthewhall2
Copy link
Contributor Author

Thanks @0xdaryl , I've addressed your comments. I've also added a couple small changes for debug printing. See PR description for details.

@matthewhall2 matthewhall2 force-pushed the dispatchJ9Method_MH_aarch64 branch 2 times, most recently from 80a1fcf to e0e7be9 Compare December 10, 2025 03:49
@0xdaryl
Copy link
Contributor

0xdaryl commented Dec 12, 2025

Your commit message says:

Adds IsJ9HelperCall to OMR::ARM64::Snippet::Kind to allow for proper
debug printing.

But I don't see that in this PR. Is it missing, or do the messages need to be updated?

Refactors ARM64HelperCallSnippet::emitSnippetBody so that the helper
call emission logic can be used by downstream projects.

Removes deprecated TR_Debug::print for ARM64HelperCallSnippet and
replaces with newer TR::ARM64HelperCallSnippet::print
	- TR::ARM64HelperCallSnippet::printInner to be used by
	  downstream projects

Signed-off-by: Matthew Hall <matthew.hall3@outlook.com>
@matthewhall2 matthewhall2 force-pushed the dispatchJ9Method_MH_aarch64 branch from e0e7be9 to 29fbede Compare December 16, 2025 20:53
@matthewhall2
Copy link
Contributor Author

Your commit message says:

Adds IsJ9HelperCall to OMR::ARM64::Snippet::Kind to allow for proper
debug printing.

But I don't see that in this PR. Is it missing, or do the messages need to be updated?

Just forgot to update the message after I took that change out

@matthewhall2 matthewhall2 removed the request for review from mstoodle December 16, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants