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

[cli/trampolines] Clean up definitions, fix win32 exporting issue #39543

Merged
merged 3 commits into from
Feb 7, 2021

Conversation

staticfloat
Copy link
Member

Our win32 trampolines weren't getting exported properly. Also take the
opportunity to properly organize after debugging libblastrampoline and
finding the current organizational strategy lacking.

In the future, if we ever want to mangle the symbols from these
trampolines, we now have a convenient CNAME() that is properly invoked
from all trampolines and can consistently mangle names.

@staticfloat staticfloat requested a review from vtjnash February 5, 2021 20:31

// aarch64 on mac requires some special assembler syntax for both calculating memory
// offsets and even just the assembler statement separator token
#if defined(__aarch64__)
Copy link
Member

Choose a reason for hiding this comment

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

why wouldn't this go in trampolines_aarch64.S, when it is only defined and used there?

Copy link
Member Author

Choose a reason for hiding this comment

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

because it's nice to have the .S files be as free of preprocessor stuff as possible; it makes it much easier to, with your eyeball, compare the trampolines across platforms.

@staticfloat staticfloat requested a review from vchuravy February 5, 2021 21:07
@staticfloat
Copy link
Member Author

Adding @vchuravy because I changed the ppc64le trampoline again; it clobbers one less register now and passes libblastrampoline tests on power now, so I figure we probably want that change here as well.

@staticfloat staticfloat force-pushed the sf/trampoline_cleanup branch 2 times, most recently from b8e70ec to 2b38b20 Compare February 5, 2021 22:02
@vchuravy vchuravy added the backport 1.6 Change should be backported to release-1.6 label Feb 5, 2021
@vchuravy vchuravy added this to the 1.6 blockers milestone Feb 5, 2021
@vchuravy vchuravy added the system:powerpc PowerPC label Feb 5, 2021
Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

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

The PPC changes look right and necessary. r9 is volatile and used to pass arguments.

@staticfloat staticfloat force-pushed the sf/trampoline_cleanup branch 4 times, most recently from f35914c to c4def51 Compare February 5, 2021 22:55
Our win32 trampolines weren't getting exported properly.  Also take the
opportunity to properly organize after debugging libblastrampoline and
finding the current organizational strategy lacking.

In the future, if we ever want to mangle the symbols from these
trampolines, we now have a convenient `CNAME()` that is properly invoked
from all trampolines and can consistently mangle names.
According to the examples on page 138-139 of the ELV v2 OpenPOWER ABI [0],
we should avoid clobbering r9 and only touch r2 and r12.  This fixed a
test failure in libblastrampoline, so it's probably needed here as well.

[0]: https://members.openpowerfoundation.org/document/dl/576
@staticfloat staticfloat force-pushed the sf/trampoline_cleanup branch from c4def51 to f0b0cd8 Compare February 5, 2021 22:56
@staticfloat staticfloat merged commit 9cf5b23 into master Feb 7, 2021
@staticfloat staticfloat deleted the sf/trampoline_cleanup branch February 7, 2021 04:16
KristofferC pushed a commit that referenced this pull request Feb 11, 2021
@KristofferC KristofferC mentioned this pull request Feb 11, 2021
52 tasks
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Mar 14, 2021
staticfloat added a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants