IMM: dst_slot = imm
| 576 | |
| 577 | // IMM: dst_slot = imm |
| 578 | void ImmCodec::encode(BytecodeBuilder& out, const IRInsn& i, const VMConfig& vm) const { |
| 579 | out.u8(vm.opcode_for(family())); |
| 580 | const auto& v = get_op<VirReg>(i, 0); |
| 581 | enc_slot(out, vm, v); |
| 582 | const auto& im = get_op<Imm>(i, 1); |
| 583 | |
| 584 | // 4-component obfuscated encoding so the original imm value never sits |
| 585 | // as contiguous bytes in the bytecode encrypted or decrypted |
| 586 | enc_imm_n_obfuscated( |
| 587 | out, |
| 588 | im.value, |
| 589 | 8, |
| 590 | vm |
| 591 | ); |
| 592 | } |
| 593 | |
| 594 | void ImmCodec::emit_handler(X64Emitter& e, const VMConfig& vm) const { |
| 595 | const auto& r = vm.dispatcher_regs(); |
no test coverage detected