From 0f1c7e3bcb2ee0cb38d228ba0d23f52ceef5623c Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 13 Dec 2023 09:36:06 -0800 Subject: RJIT: Just skip generating code for aarch64/arm64 (#9221) --- lib/ruby_vm/rjit/compiler.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/ruby_vm/rjit') diff --git a/lib/ruby_vm/rjit/compiler.rb b/lib/ruby_vm/rjit/compiler.rb index 9ae528a0e9..2c4e1d67cf 100644 --- a/lib/ruby_vm/rjit/compiler.rb +++ b/lib/ruby_vm/rjit/compiler.rb @@ -59,6 +59,7 @@ module RubyVM::RJIT # @param iseq `RubyVM::RJIT::CPointer::Struct_rb_iseq_t` # @param cfp `RubyVM::RJIT::CPointer::Struct_rb_control_frame_t` def compile(iseq, cfp) + return unless supported_platform? pc = cfp.pc.to_i jit = JITState.new(iseq:, cfp:) asm = Assembler.new @@ -505,5 +506,12 @@ module RubyVM::RJIT raise "'#{cond.inspect}' was not true" end end + + def supported_platform? + return @supported_platform if defined?(@supported_platform) + @supported_platform = RUBY_PLATFORM.match?(/x86_64/).tap do |supported| + warn "warning: RJIT does not support #{RUBY_PLATFORM} yet" unless supported + end + end end end -- cgit v1.2.3