History

Alter register address decoding using a lookup table instead of single function with multiple switch blocks. Reduced scheduler sleep time during tool dispatch setting.

arr committed 10 years ago

Commit 824a71a1 parent fcc75fd7 files · +500 −86Browse files

Showing the changes to src/exec/main.cpp (1 of 7 files). Show all

Unified · Split

src/exec/main.cpp+13−1
@@ -107,6 +107,7 @@ namespace · 106 unmodified lines
107 { vm_exec_op_t107 { vm_exec_op_t
108 {108 {
109 opcode_t::load,109 opcode_t::load,
110 assembly::construct_address_code(address_mode_t::offset_indirect_mp, address_mode_middle_t::small_immediate, address_mode_t::offset_indirect_fp),
110 { address_mode_t::offset_indirect_mp, 0, 0 }, // command module path111 { address_mode_t::offset_indirect_mp, 0, 0 }, // command module path
111 { address_mode_middle_t::small_immediate, 0 }, // import table index112 { address_mode_middle_t::small_immediate, 0 }, // import table index
112 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference113 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference
@@ -115,6 +116,7 @@ namespace · 2 unmodified lines
115 { vm_exec_op_t116 { vm_exec_op_t
116 {117 {
117 opcode_t::mframe,118 opcode_t::mframe,
119 assembly::construct_address_code(address_mode_t::offset_indirect_fp, address_mode_middle_t::small_immediate, address_mode_t::offset_indirect_fp),
118 { address_mode_t::offset_indirect_fp, 20, 0 }, // module reference120 { address_mode_t::offset_indirect_fp, 20, 0 }, // module reference
119 { address_mode_middle_t::small_immediate, 0 }, // function index into module121 { address_mode_middle_t::small_immediate, 0 }, // function index into module
120 { address_mode_t::offset_indirect_fp, 24, 0 } // module call frame122 { address_mode_t::offset_indirect_fp, 24, 0 } // module call frame
@@ -123,6 +125,7 @@ namespace · 2 unmodified lines
123 { vm_exec_op_t125 { vm_exec_op_t
124 {126 {
125 opcode_t::movp,127 opcode_t::movp,
128 assembly::construct_address_code(address_mode_t::offset_indirect_mp, address_mode_middle_t::none, address_mode_t::offset_double_indirect_fp),
126 { address_mode_t::offset_indirect_mp, 4, 0 }, // Argument list129 { address_mode_t::offset_indirect_mp, 4, 0 }, // Argument list
127 { address_mode_middle_t::none },130 { address_mode_middle_t::none },
128 { address_mode_t::offset_double_indirect_fp, 24, first_arg_offset } // module call frame -> argument list offset131 { address_mode_t::offset_double_indirect_fp, 24, first_arg_offset } // module call frame -> argument list offset
@@ -131,12 +134,21 @@ namespace · 2 unmodified lines
131 { vm_exec_op_t134 { vm_exec_op_t
132 {135 {
133 opcode_t::mcall,136 opcode_t::mcall,
137 assembly::construct_address_code(address_mode_t::offset_indirect_fp, address_mode_middle_t::small_immediate, address_mode_t::offset_indirect_fp),
134 { address_mode_t::offset_indirect_fp, 24, 0 }, // module call frame138 { address_mode_t::offset_indirect_fp, 24, 0 }, // module call frame
135 { address_mode_middle_t::small_immediate, 0 }, // function index into module139 { address_mode_middle_t::small_immediate, 0 }, // function index into module
136 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference140 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference
137 }141 }
138 },142 },
139 { vm_exec_op_t{ opcode_t::ret,{ address_mode_t::none },{ address_mode_middle_t::none },{ address_mode_t::none } } },143 { vm_exec_op_t
144 {
145 opcode_t::ret,
146 assembly::construct_address_code(address_mode_t::none, address_mode_middle_t::none, address_mode_t::none),
147 { address_mode_t::none },
148 { address_mode_middle_t::none },
149 { address_mode_t::none }
150 }
151 },
140 };152 };
141 153
142 // Create import section for Exec154 // Create import section for Exec