diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2022-11-23 10:48:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 10:48:17 -0500 |
| commit | e82b15b6603ddc6754f4cfa7a189c0acb0ccce71 (patch) | |
| tree | 34230baccb47cf953b1eccfeb8c45e38a2845ddb /include/ruby/internal/intern/ruby.h | |
| parent | aedf682bfad425149053f58c9115bc830da4efd1 (diff) | |
Fix YJIT backend to account for unsigned int immediates (#6789)
YJIT: x86_64: Fix cmp with number where sign bit is set
Before this commit, we were unconditionally treating unsigned ints as
signed ints when counting the number of bits required for representing
the immediate in machine code. When the size of the immediate matches
the size of the other operand, no sign extension happens, so this was
incorrect. `asm.cmp(opnd64, 0x8000_0000)` panicked even though it's
encodable as `CMP r/m32, imm32`. Large shape ids were impacted by this
issue.
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Alan Wu <alanwu@ruby-lang.org>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'include/ruby/internal/intern/ruby.h')
0 files changed, 0 insertions, 0 deletions
