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

add minimal support for aarch64 #507

Merged

Conversation

JakeHillion
Copy link
Contributor

Summary:
OI is currently completely incompatible with anything except x86_64. Changing that generally is a big effort, but oilgen should work on other architectures. Begin adding some support for aarch64 architecture.

This change sets up a file structure for architecture support. It pulls the 2 functions needed to make Descs.{h,cpp} architecture agnostic into architecture specific files for x86_64 and aarch64. This enables oilgen (the binary) to build. At this stage oilgen is unable to generate working code for aarch64, but at least this is a step in the right direction.

Differential Revision: D61661524

@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D61661524

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 60.79%. Comparing base (8831269) to head (c70d6b2).

Files Patch % Lines
oi/Descs.h 0.00% 2 Missing ⚠️
oi/arch/x86_64.cpp 60.00% 2 Missing ⚠️
oi/Descs.cpp 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #507      +/-   ##
==========================================
- Coverage   60.80%   60.79%   -0.01%     
==========================================
  Files         126      127       +1     
  Lines       12493    12498       +5     
  Branches     2014     2014              
==========================================
+ Hits         7596     7598       +2     
- Misses       3940     3943       +3     
  Partials      957      957              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D61661524

JakeHillion added a commit to JakeHillion/object-introspection that referenced this pull request Aug 22, 2024
Summary:
Pull Request resolved: facebookexperimental#507

OI is currently completely incompatible with anything except `x86_64`. Changing that generally is a big effort, but `oilgen` should work on other architectures. Begin adding some support for `aarch64` architecture.

This change sets up a file structure for architecture support. It pulls the 2 functions needed to make `Descs.{h,cpp}` architecture agnostic into architecture specific files for `x86_64` and `aarch64`. This enables `oilgen` (the binary) to build. At this stage `oilgen` is unable to generate working code for `aarch64`, but at least this is a step in the right direction.

Differential Revision: D61661524
Summary:
Pull Request resolved: facebookexperimental#507

OI is currently completely incompatible with anything except `x86_64`. Changing that generally is a big effort, but `oilgen` should work on other architectures. Begin adding some support for `aarch64` architecture.

This change sets up a file structure for architecture support. It pulls the 2 functions needed to make `Descs.{h,cpp}` architecture agnostic into architecture specific files for `x86_64` and `aarch64`. This enables `oilgen` (the binary) to build. At this stage `oilgen` is unable to generate working code for `aarch64`, but at least this is a step in the right direction.

Differential Revision: D61661524
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D61661524

@JakeHillion JakeHillion requested a review from ajor August 23, 2024 09:51

void setProgramCounter(user_regs_struct& regs, uintptr_t pc);

std::optional<uintptr_t> getReturnValueAddress(const user_regs_struct&);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why return an optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mainly did this to match the existing API, though it was never optional there either. This way it might be possible to part implement an architecture if it's ever difficult to get the return value/guess an arg position in future.

@facebook-github-bot facebook-github-bot merged commit b7b9ac1 into facebookexperimental:main Aug 23, 2024
13 of 14 checks passed
@JakeHillion JakeHillion deleted the export-D61661524 branch August 28, 2024 10:30
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.

4 participants