mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
Implement putobject
This commit is contained in:
parent
9352f94a1b
commit
7a19aad8c3
3 changed files with 86 additions and 11 deletions
|
@ -245,6 +245,10 @@ module RubyVM::MJIT
|
|||
end
|
||||
end
|
||||
|
||||
def imm32?(imm)
|
||||
(-0x8000_0000..0x7fff_ffff).include?(imm) # TODO: consider uimm
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def insn(prefix: nil, opcode:, mod_rm: nil, disp: nil, imm: nil)
|
||||
|
@ -347,16 +351,8 @@ module RubyVM::MJIT
|
|||
(-0x80..0x7f).include?(imm)
|
||||
end
|
||||
|
||||
def imm32?(imm)
|
||||
raise "negative imm not supported: #{imm}" if imm.negative? # TODO: support this
|
||||
# TODO: consider rejecting small values
|
||||
imm <= 0x7fff_ffff # TODO: consider uimm
|
||||
end
|
||||
|
||||
def imm64?(imm)
|
||||
raise "negative imm not supported: #{imm}" if imm.negative? # TODO: support this
|
||||
# TODO: consider rejecting small values
|
||||
imm <= 0x7fff_ffff_ffff_ffff # TODO: consider uimm
|
||||
(-0x8000_0000_0000_0000..0x7fff_ffff_ffff_ffff).include?(imm) # TODO: consider uimm
|
||||
end
|
||||
|
||||
def r32?(reg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue