Uh oh!
There was an error while loading. Please reload this page.
Handle more than 64 registers - Part 5 - #103188
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
kunalspathak
commented
Jun 10, 2024
@dotnet/jit-contrib @jakobbotsch PTAL |
| // passed in is preserved by the validator and take care to get the | ||
| // target from the register for the call (even in debug mode). | ||
| static_assert_no_msg((RBM_VALIDATE_INDIRECT_CALL_TRASH & (1 << REG_VALIDATE_INDIRECT_CALL_ADDR)) == 0); | ||
| static_assert_no_msg((RBM_VALIDATE_INDIRECT_CALL_TRASH & regMaskTP(1 << REG_VALIDATE_INDIRECT_CALL_ADDR)) == |
There was a problem hiding this comment.
We can make IsRegNumInMaskconstexpr to make this a bit more natural (feel free to do as part of a follow-up).
There was a problem hiding this comment.
I tried doing that, but as a cascade effect I need to make genSingleTypeRegSet, getRegForType(), etc. as constexpr which I am not sure is worth doing for just an assert. Will pass this on for now.
| hasPC = (imm & SRBM_PC) != 0; | ||
| hasLR = (imm & SRBM_LR) != 0; | ||
| imm &= ~(SRBM_PC | SRBM_LR); |
There was a problem hiding this comment.
I guess this means there is (and was) an invariant on the exact indices defined for these registers?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| static constexpr regMaskTP CreateFromRegNum(regNumber reg, regMaskSmall mask) | ||
| { |
There was a problem hiding this comment.
Is mask needed as a parameter? Can't we compute it here as 1 << reg?
There was a problem hiding this comment.
predicate registers starts from 64 thru 80 and the mask of them start with 0x0. I can make it work, but just want to rely on the mask that we already have in register files and how we use them currently.
There was a problem hiding this comment.
For predicate registers it would just be (1 << (reg - 64)) under the if, I suppose.
There was a problem hiding this comment.
Sure, I don't have much preference on which way or the other, but will keep this in mind during follow up.
jakobbotsch
left a comment
There was a problem hiding this comment.
Nice, this looks great to me. Most changes look mechanical.
kunalspathak
commented
Jun 11, 2024
/rerun |
kunalspathak
commented
Jun 11, 2024
@dotnet-policy-service rerun |
1 similar comment
kunalspathak
commented
Jun 11, 2024
@dotnet-policy-service rerun |
RBM_REG*toregMaskTPSRBM_REG*that can be used at places where we just needSingleTypeRegSetregMaskTPfor registers at killRefPosition