Add f16 and f128 inline ASM support for x86 and x86-64 by beetrees · Pull Request #126417 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation7 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

beetrees

This PR adds f16 and f128 input and output support to inline ASM on x86 and x86-64. f16 vector sizes are taken from here.

Relevant issue: #125398
Tracking issue: #116909

@rustbot label +F-f16_and_f128

@beetrees

@rustbot

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@petrochenkov

@tgross35

Thanks, there is some overlap here with #126070

Amanieu

}
}
Self::reg_byte => types! { _: I8; },
Self::xmm_reg => types! {
sse: I32, I64, F32, F64,
VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF32(4), VecF64(2);
sse: I32, I64, F16, F32, F64, F128,

Choose a reason for hiding this comment

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

I would hold back on adding f128 as an allowed input type since there aren't any instructions that actually support that type.

But for f16 this seems fine.

Choose a reason for hiding this comment

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

While there aren't any instructions that take f128 as an operand, f128 is passed and returned in XMM registers as part of the x86-64 System V C ABI so seems worth including.

@Amanieu

@bors

📌 Commit dfc5514 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jun 14, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 15, 2024

@matthiaskrgr

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jun 15, 2024

@bors

…iaskrgr

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jun 15, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jun 15, 2024

@rust-timer

@beetrees beetrees deleted the f16-f128-inline-asm-x86 branch

June 15, 2024 19:10

This was referenced

Jun 17, 2024

Labels

F-f16_and_f128

`#![feature(f16)]`, `#![feature(f128)]`

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.