Skip to content

Update the bit field of encoding function names#96082

Merged
kunalspathak merged 5 commits intodotnet:mainfrom
kunalspathak:sve-encoding-fn
Dec 18, 2023
Merged

Update the bit field of encoding function names#96082
kunalspathak merged 5 commits intodotnet:mainfrom
kunalspathak:sve-encoding-fn

Conversation

@kunalspathak
Copy link
Contributor

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.

@ghost ghost 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
Contributor Author

@dotnet/arm64-contrib @a74nh @SwapnilGaikwad

@SwapnilGaikwad
Copy link
Contributor

LGTM!

{
assert(isIntegerRegister(reg));
emitter::code_t ureg = (emitter::code_t)reg;
assert((ureg >= 0) && (ureg <= 32));
Copy link
Contributor

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
Contributor 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
Contributor 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.

@kunalspathak kunalspathak merged commit 435c323 into dotnet:main Dec 18, 2023
@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