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

fix: asm() using the incorrect assembler for amd64 architecture #2558

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

CuB3y0nd
Copy link

@CuB3y0nd CuB3y0nd commented Mar 1, 2025

Changed the priority of assembler usage in amd64

@Arusekk
Copy link
Member

Arusekk commented Mar 1, 2025

Thanks! Now I think I did not say it clearly: we want every architrcture to follow this pattern.

For example, assembling aarch64 should first try aarch64*-as, then native (if and only if host arch is aarch64), and then arm*-as as it frequently implements aarch64. And so on.

It should also be based on existing which_binutils function. My globs were supposed to be just illustrative, but the code should be kind of like the following:

aliases = {
 'aarch64': ['arm', 'something-exotic'],
 'amd64': ['i386', 'whatever'],
...
}

try(target)
if hostmachine == target: try(native)
for alias in aliases[target]:
  try(alias)

So just like it used to be, but native moved between the first try and the rest of them, instead of current buggy implementation (native is currently considered last).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants