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

Update the bit field of encoding function names #96082

Merged
merged 5 commits into from
Dec 18, 2023

Conversation

kunalspathak
Copy link
Member

The arm manual parsing tool had a bug where I was not taking into account the extra space, resulting in function names off by 1. Renamed the function names.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 16, 2023
@kunalspathak kunalspathak added arm-sve Work related to arm64 SVE/SVE2 support and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Dec 16, 2023
@ghost ghost assigned kunalspathak Dec 16, 2023
@kunalspathak
Copy link
Member Author

@dotnet/arm64-contrib @a74nh @SwapnilGaikwad

@SwapnilGaikwad
Copy link
Contributor

LGTM!

src/coreclr/jit/emitarm64.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/emitarm64.cpp Outdated Show resolved Hide resolved
*/

/*static*/ emitter::code_t emitter::insEncodeReg_R_18_to_17(regNumber reg)
/*static*/ emitter::code_t emitter::insEncodeReg_R_17_to_16(regNumber reg)
{
assert(isIntegerRegister(reg));
emitter::code_t ureg = (emitter::code_t)reg;
assert((ureg >= 0) && (ureg <= 32));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert((ureg >= 0) && (ureg <= 32));
assert((ureg >= 0) && (ureg <= 3));

?

Copy link
Member Author

Choose a reason for hiding this comment

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

psel uses this encoding and I am not sure what register represents by 2 bits. The manual says "Is the 32-bit name of the vector select register W12-W15, encoded in the "Rv" field.". @a74nh do you know?

Copy link
Contributor

Choose a reason for hiding this comment

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

PSEL <Pd>, <Pn>, <Pm>.<T>[<Wv>, <imm>]

It's the Wv in the above. That's quite an odd instruction encoding - it's trying to fit in 4 registers, a 5bit immediate and the element size.

It's not explicitly mentioned, but w12 would be 00, w13 would be 01, etc

So, the assert should be (ureg >= 12) && (ureg <= 15).

Copy link
Member Author

Choose a reason for hiding this comment

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

hoping to get it address in #95996 to skip a CI run.

src/coreclr/jit/emitarm64.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/emitarm64.cpp Outdated Show resolved Hide resolved
@kunalspathak kunalspathak merged commit 435c323 into dotnet:main Dec 18, 2023
127 of 129 checks passed
@kunalspathak kunalspathak deleted the sve-encoding-fn branch December 18, 2023 17:54
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arm-sve Work related to arm64 SVE/SVE2 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants