MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / get_operand_values

Function get_operand_values

LiveRecomp/live_generator.cpp:280–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280bool get_operand_values(N64Recomp::Operand operand, const N64Recomp::InstructionContext& context, sljit_sw& out, sljit_sw& outw,
281 sljit_compiler* compiler, int odd_float_address_register
282)
283{
284 using namespace N64Recomp;
285
286 switch (operand) {
287 case Operand::Rd:
288 get_gpr_values(context.rd, out, outw);
289 break;
290 case Operand::Rs:
291 get_gpr_values(context.rs, out, outw);
292 break;
293 case Operand::Rt:
294 get_gpr_values(context.rt, out, outw);
295 break;
296 case Operand::Fd:
297 out = SLJIT_MEM1(Registers::ctx);
298 outw = get_fpr_single_context_offset(context.fd);
299 break;
300 case Operand::Fs:
301 out = SLJIT_MEM1(Registers::ctx);
302 outw = get_fpr_single_context_offset(context.fs);
303 break;
304 case Operand::Ft:
305 out = SLJIT_MEM1(Registers::ctx);
306 outw = get_fpr_single_context_offset(context.ft);
307 break;
308 case Operand::FdDouble:
309 out = SLJIT_MEM1(Registers::ctx);
310 outw = get_fpr_double_context_offset(context.fd);
311 break;
312 case Operand::FsDouble:
313 out = SLJIT_MEM1(Registers::ctx);
314 outw = get_fpr_double_context_offset(context.fs);
315 break;
316 case Operand::FtDouble:
317 out = SLJIT_MEM1(Registers::ctx);
318 outw = get_fpr_double_context_offset(context.ft);
319 break;
320 case Operand::FdU32L:
321 get_fpr_u32l_context_offset(context.fd, compiler, odd_float_address_register, out, outw);
322 break;
323 case Operand::FsU32L:
324 get_fpr_u32l_context_offset(context.fs, compiler, odd_float_address_register, out, outw);
325 break;
326 case Operand::FtU32L:
327 get_fpr_u32l_context_offset(context.ft, compiler, odd_float_address_register, out, outw);
328 break;
329 case Operand::FdU32H:
330 assert(false);
331 return false;
332 case Operand::FsU32H:
333 assert(false);
334 return false;
335 case Operand::FtU32H:
336 assert(false);
337 return false;

Callers 4

process_binary_opMethod · 0.85
process_unary_opMethod · 0.85
process_store_opMethod · 0.85
emit_branch_conditionMethod · 0.85

Calls 5

get_gpr_valuesFunction · 0.85

Tested by

no test coverage detected