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
107107 { vm_exec_op_t
108108 {
109109 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),
110111 { address_mode_t::offset_indirect_mp, 0, 0 }, // command module path
111112 { address_mode_middle_t::small_immediate, 0 }, // import table index
112113 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference
@@ -115,6 +116,7 @@ namespace · 2 unmodified lines
115116 { vm_exec_op_t
116117 {
117118 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),
118120 { address_mode_t::offset_indirect_fp, 20, 0 }, // module reference
119121 { address_mode_middle_t::small_immediate, 0 }, // function index into module
120122 { address_mode_t::offset_indirect_fp, 24, 0 } // module call frame
@@ -123,6 +125,7 @@ namespace · 2 unmodified lines
123125 { vm_exec_op_t
124126 {
125127 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),
126129 { address_mode_t::offset_indirect_mp, 4, 0 }, // Argument list
127130 { address_mode_middle_t::none },
128131 { 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
131134 { vm_exec_op_t
132135 {
133136 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),
134138 { address_mode_t::offset_indirect_fp, 24, 0 }, // module call frame
135139 { address_mode_middle_t::small_immediate, 0 }, // function index into module
136140 { address_mode_t::offset_indirect_fp, 20, 0 } // module reference
137141 }
138142 },
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+ },
140152 };
141153
142154 // Create import section for Exec