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

AArch64: Allow negative immediate offset for memory access #4628

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

knn-k
Copy link
Contributor

@knn-k knn-k commented Dec 3, 2019

This commit rewrites the instruction "ldrimmw" (12-bit unsigned offset)
to "ldurw" (9-bit signed offset) when a negative value is used as the
offset.

Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com

@knn-k knn-k requested a review from 0xdaryl as a code owner December 3, 2019 02:47
@knn-k
Copy link
Contributor Author

knn-k commented Dec 3, 2019

I don't really like this workaround, but I need to do something to allow the negative offset (-4) for accessing startPCLinkageInfo.

iloadi [#281 Shadow -4] [flags 0x603 0x0 ]

I would appreciate alternative ideas.

}
else
{
TR_ASSERT(false, "Offset is too large for specified instruction.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this a fatal assert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to TR_ASSERT_FATAL().

}
else
{
TR_ASSERT(false, "Offset is too large for specified instruction.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this a fatal assert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to TR_ASSERT_FATAL().

This commit rewrites the instruction "ldrimmw" (12-bit unsigned offset)
to "ldurw" (9-bit signed offset) when a negative value is used as the
offset.

Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
@0xdaryl
Copy link
Contributor

0xdaryl commented Dec 6, 2019

@genie-omr build aarch64

@0xdaryl 0xdaryl self-assigned this Dec 6, 2019
@0xdaryl 0xdaryl merged commit 736596e into eclipse-omr:master Dec 6, 2019
@knn-k knn-k deleted the aarch64memref14 branch December 6, 2019 02:18
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