aboutsummaryrefslogtreecommitdiffstats
path: root/tool/ruby_vm/views
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-09-23 03:02:01 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:24 -0400
commit3d87eadf16a086d2f3bec0b556760c0ebfe1e7cd (patch)
tree9a43222482c933b9cd2d53e19d3c83bbb35cd717 /tool/ruby_vm/views
parent2eaf55fcf1f7afbd0190e47ffe352b29047e6144 (diff)
downloadruby-3d87eadf16a086d2f3bec0b556760c0ebfe1e7cd.tar.gz
Refactor ujit_examples.h generator. Remove dwarfdump dependency
Diffstat (limited to 'tool/ruby_vm/views')
-rw-r--r--tool/ruby_vm/views/ujit_examples.inc.erb16
-rw-r--r--tool/ruby_vm/views/vm.inc.erb2
2 files changed, 17 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/ujit_examples.inc.erb b/tool/ruby_vm/views/ujit_examples.inc.erb
new file mode 100644
index 0000000000..a301c5ca74
--- /dev/null
+++ b/tool/ruby_vm/views/ujit_examples.inc.erb
@@ -0,0 +1,16 @@
+/* -*- C -*- */
+
+%# Copyright (c) 2020 Wu, Alan. All rights reserved.
+%#
+%# This file is a part of the programming language Ruby. Permission is hereby
+%# granted, to either redistribute and/or modify this file, provided that the
+%# conditions mentioned in the file COPYING are met. Consult the file for
+%# details.
+<%= render 'copyright' %>
+<%= render 'notice', locals: {
+ this_file: 'contains raw instruction bytes that helps MicroJIT generate code',
+ edit: __FILE__,
+} -%>
+
+static const uint8_t ujit_pre_call_bytes[] = { <%= RubyVM::MicroJIT.pre_call_bytes %> };
+static const uint8_t ujit_post_call_bytes[] = { <%= RubyVM::MicroJIT.post_call_bytes %> };
diff --git a/tool/ruby_vm/views/vm.inc.erb b/tool/ruby_vm/views/vm.inc.erb
index 7942a3ef87..3c7b602859 100644
--- a/tool/ruby_vm/views/vm.inc.erb
+++ b/tool/ruby_vm/views/vm.inc.erb
@@ -28,7 +28,7 @@
% RubyVM::TraceInstructions.to_a.each do |insn|
<%= render 'trace_instruction', locals: { insn: insn } -%>
% end
-% RubyVM::UJITExampleInstructions.to_a.each do |insn|
+% RubyVM::MicroJIT::ExampleInstructions.to_a.each do |insn|
INSN_ENTRY(<%= insn.name %>)
{
START_OF_ORIGINAL_INSN(<%= insn.name %>);