diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-09 13:30:31 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-09 13:30:31 +0000 |
commit | 55317a74f7df73bb3531ade54418c4bf6f95b30b (patch) | |
tree | e83ff5745104434e1373cafe8bb5a859a05b59c2 /template/optunifs.inc.tmpl | |
parent | ae4045f0cab0a9188124a00f55fdb804a3ec1cfd (diff) | |
download | ruby-55317a74f7df73bb3531ade54418c4bf6f95b30b.tar.gz |
delete tool/instruction.rb
Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch. My attempt includes
- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view
Also, let me take this opportunity to kill old unused features
such as
- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb
This commit generates VM source codes that cleanly compile, and
the generated binary passes tests. At least for me.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template/optunifs.inc.tmpl')
-rw-r--r-- | template/optunifs.inc.tmpl | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/template/optunifs.inc.tmpl b/template/optunifs.inc.tmpl deleted file mode 100644 index 3ac5872346..0000000000 --- a/template/optunifs.inc.tmpl +++ /dev/null @@ -1,67 +0,0 @@ -/* -*-c-*- *********************************************************/ -/*******************************************************************/ -/*******************************************************************/ -/** - This file is for threaded code. - - ---- - This file is auto generated by insns2vm.rb - DO NOT TOUCH! - - If you want to fix something, you must edit 'template/optunifs.inc.tmpl' - or tool/insns2vm.rb - */ - -/* - static const int UNIFIED_insn_name_1[] = {id, size, ...}; - static const int UNIFIED_insn_name_2[] = {id, size, ...}; - ... - - static const int *const UNIFIED_insn_name[] = {size, - UNIFIED_insn_name_1, - UNIFIED_insn_name_2, ...}; - ... - - static const int *const *const unified_insns_data[] = { - UNIFIED_insn_nameA, - UNIFIED_insn_nameB, ...}; - */ - -% unif_insns_data = @insns.find_all {|insn| !insn.is_sc}.map do |insn| -% size = insn.unifs.size -% if size > 0 -% name = "UNIFIED_#{insn.name}" -% insn.unifs.sort_by{|unif| -unif[1].size}.each_with_index do |(uni_insn, uni_insns), i| -% uni_insns = uni_insns[1..-1] -static const int <%=name%>_<%=i%>[] = { - BIN(<%=uni_insn.name%>), <%=uni_insns.size + 2%>, - <% uni_insns.map{|e| -%> -BIN(<%=e.name%>),<% -%> -% } - -}; -% end - -static const int *const <%=name%>[] = {(int *)<%=size+1%>, -% size.times do |e| - <%=name%>_<%=e%>, -% end -}; -% name -% end -% end - -static const int *const *const unified_insns_data[] = {<%#-%> -% unif_insns_data.each_with_index do |insn, i| -% if (i%8).zero? - - <% -%> -% end - <%=insn || "0"%>,<%#-%> -% end - -}; - -#undef GET_INSN_NAME - -ASSERT_VM_INSTRUCTION_SIZE(unified_insns_data); |