Skip to content

AArch64 macOS: Implement omrsignal_context.c - #6215

Merged
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
knn-k:aarch64macos3
Nov 1, 2021
Merged

0xdaryl merged 1 commit into
eclipse-omr:masterfrom
knn-k:aarch64macos3

Conversation

@knn-k

@knn-k knn-k commented Oct 22, 2021

Copy link
Copy Markdown
Contributor

This commit implements omrsignal_context.c for AArch64 macOS.

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

Comment thread port/osx/omrsignal_context.c Outdated
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
};

if (0 <= index && index < sizeof(fpr_names)/sizeof(char *)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing parentheses, spaces around /.
Number of elements of an array is better expressed as sizeof(array) / sizeof(array[0]) (then you can't get the element type wrong).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@keithc-ca keithc-ca Oct 28, 2021 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There should be parentheses around every binary operation:

	if ((0 <= index) && (index < (sizeof(fpr_names) / sizeof(fpr_names[0])))) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed as suggested.

Comment thread port/osx/omrsignal_context.c Outdated
"x24", "x25", "x26", "x27", "x28"
};

if (0 <= index && index < sizeof(gpr_names)/sizeof(char *)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment as above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As above:

    if ((0 <= index) && (index < (sizeof(gpr_names) / sizeof(gpr_names[0])))) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed as suggested.

Comment thread port/osx/omrsignal_context.c Outdated
case OMRPORT_SIG_CONTROL_PC:
case 0:
*name = "PC";
*value = (void *)&(threadState->__pc);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the parentheses here and on line 387 (you didn't use them above)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the parentheses.

This commit implements omrsignal_context.c for AArch64 macOS.

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

0xdaryl commented Nov 1, 2021

Copy link
Copy Markdown
Contributor

Jenkins build all

@0xdaryl 0xdaryl self-assigned this Nov 1, 2021
@0xdaryl
0xdaryl merged commit 79e5193 into eclipse-omr:master Nov 1, 2021
@knn-k
knn-k deleted the aarch64macos3 branch November 1, 2021 23:11
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.

3 participants