reload cipher_state from cipher_init
| 96 | |
| 97 | // reload cipher_state from cipher_init |
| 98 | inline void emit_cipher_reset(X64Emitter& e, const VMConfig& vm) { |
| 99 | const auto& r = vm.dispatcher_regs(); |
| 100 | const std::int32_t init_off = static_cast<std::int32_t>(vm.state_layout().cipher_extra) + kCipherInitOff; |
| 101 | e.mov_reg_mem( |
| 102 | r.cipher_state, |
| 103 | r.state_ptr, |
| 104 | init_off, |
| 105 | true |
| 106 | ); |
| 107 | } |
| 108 | |
| 109 | // fetch one byte from [ip], decrypt with current cipher state, update state, |
| 110 | // advance ip, leave result in low 8 of dst |
no test coverage detected