SoftCPU.cpp 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright notice, this
  9. * list of conditions and the following disclaimer.
  10. *
  11. * 2. Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  19. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  21. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  22. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  23. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  24. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #include "SoftCPU.h"
  27. #include "Emulator.h"
  28. #include <AK/Assertions.h>
  29. #include <stdio.h>
  30. #include <string.h>
  31. namespace UserspaceEmulator {
  32. template<typename T>
  33. struct TypeDoubler {
  34. };
  35. template<>
  36. struct TypeDoubler<u8> {
  37. typedef u16 type;
  38. };
  39. template<>
  40. struct TypeDoubler<u16> {
  41. typedef u32 type;
  42. };
  43. template<>
  44. struct TypeDoubler<u32> {
  45. typedef u64 type;
  46. };
  47. template<>
  48. struct TypeDoubler<i8> {
  49. typedef i16 type;
  50. };
  51. template<>
  52. struct TypeDoubler<i16> {
  53. typedef i32 type;
  54. };
  55. template<>
  56. struct TypeDoubler<i32> {
  57. typedef i64 type;
  58. };
  59. SoftCPU::SoftCPU(Emulator& emulator)
  60. : m_emulator(emulator)
  61. {
  62. memset(m_gpr, 0, sizeof(m_gpr));
  63. m_segment[(int)X86::SegmentRegister::CS] = 0x18;
  64. m_segment[(int)X86::SegmentRegister::DS] = 0x20;
  65. m_segment[(int)X86::SegmentRegister::ES] = 0x20;
  66. m_segment[(int)X86::SegmentRegister::SS] = 0x20;
  67. }
  68. void SoftCPU::dump() const
  69. {
  70. printf("eax=%08x ebx=%08x ecx=%08x edx=%08x ", eax(), ebx(), ecx(), edx());
  71. printf("ebp=%08x esp=%08x esi=%08x edi=%08x ", ebp(), esp(), esi(), edi());
  72. printf("o=%u s=%u z=%u a=%u p=%u c=%u\n", of(), sf(), zf(), af(), pf(), cf());
  73. }
  74. u32 SoftCPU::read_memory32(X86::LogicalAddress address)
  75. {
  76. ASSERT(address.selector() == 0x20);
  77. auto value = m_emulator.mmu().read32(address.offset());
  78. printf("\033[36;1mread_memory32: @%08x -> %08x\033[0m\n", address.offset(), value);
  79. return value;
  80. }
  81. void SoftCPU::write_memory32(X86::LogicalAddress address, u32 value)
  82. {
  83. ASSERT(address.selector() == 0x20);
  84. printf("\033[35;1mwrite_memory32: @%08x <- %08x\033[0m\n", address.offset(), value);
  85. m_emulator.mmu().write32(address.offset(), value);
  86. }
  87. void SoftCPU::push32(u32 value)
  88. {
  89. set_esp(esp() - sizeof(value));
  90. write_memory32({ ss(), esp() }, value);
  91. }
  92. u32 SoftCPU::pop32()
  93. {
  94. auto value = read_memory32({ ss(), esp() });
  95. set_esp(esp() + sizeof(value));
  96. return value;
  97. }
  98. template<typename Destination, typename Source>
  99. static typename TypeDoubler<Destination>::type op_xor(SoftCPU& cpu, Destination& dest, const Source& src)
  100. {
  101. auto result = dest ^ src;
  102. cpu.set_zf(dest == 0);
  103. cpu.set_sf(dest & 0x80000000);
  104. // FIXME: set_pf
  105. cpu.set_of(false);
  106. cpu.set_cf(false);
  107. return result;
  108. }
  109. template<typename Op>
  110. void SoftCPU::generic_RM32_reg32(Op op, const X86::Instruction& insn)
  111. {
  112. auto dest = insn.modrm().read32(*this, insn);
  113. auto src = gpr32(insn.reg32());
  114. auto result = op(*this, dest, src);
  115. insn.modrm().write32(*this, insn, result);
  116. }
  117. template<typename Op>
  118. void SoftCPU::generic_RM32_imm32(Op op, const X86::Instruction& insn)
  119. {
  120. auto dest = insn.modrm().read32(*this, insn);
  121. auto src = insn.imm32();
  122. auto result = op(*this, dest, src);
  123. insn.modrm().write32(*this, insn, result);
  124. }
  125. template<typename Op>
  126. void SoftCPU::generic_RM32_imm8(Op op, const X86::Instruction& insn)
  127. {
  128. auto dest = insn.modrm().read32(*this, insn);
  129. auto src = insn.imm8();
  130. auto result = op(*this, dest, src);
  131. insn.modrm().write32(*this, insn, result);
  132. }
  133. void SoftCPU::AAA(const X86::Instruction&) { TODO(); }
  134. void SoftCPU::AAD(const X86::Instruction&) { TODO(); }
  135. void SoftCPU::AAM(const X86::Instruction&) { TODO(); }
  136. void SoftCPU::AAS(const X86::Instruction&) { TODO(); }
  137. void SoftCPU::ADC_AL_imm8(const X86::Instruction&) { TODO(); }
  138. void SoftCPU::ADC_AX_imm16(const X86::Instruction&) { TODO(); }
  139. void SoftCPU::ADC_EAX_imm32(const X86::Instruction&) { TODO(); }
  140. void SoftCPU::ADC_RM16_imm16(const X86::Instruction&) { TODO(); }
  141. void SoftCPU::ADC_RM16_imm8(const X86::Instruction&) { TODO(); }
  142. void SoftCPU::ADC_RM16_reg16(const X86::Instruction&) { TODO(); }
  143. void SoftCPU::ADC_RM32_imm32(const X86::Instruction&) { TODO(); }
  144. void SoftCPU::ADC_RM32_imm8(const X86::Instruction&) { TODO(); }
  145. void SoftCPU::ADC_RM32_reg32(const X86::Instruction&) { TODO(); }
  146. void SoftCPU::ADC_RM8_imm8(const X86::Instruction&) { TODO(); }
  147. void SoftCPU::ADC_RM8_reg8(const X86::Instruction&) { TODO(); }
  148. void SoftCPU::ADC_reg16_RM16(const X86::Instruction&) { TODO(); }
  149. void SoftCPU::ADC_reg32_RM32(const X86::Instruction&) { TODO(); }
  150. void SoftCPU::ADC_reg8_RM8(const X86::Instruction&) { TODO(); }
  151. void SoftCPU::ADD_AL_imm8(const X86::Instruction&) { TODO(); }
  152. void SoftCPU::ADD_AX_imm16(const X86::Instruction&) { TODO(); }
  153. void SoftCPU::ADD_EAX_imm32(const X86::Instruction&) { TODO(); }
  154. void SoftCPU::ADD_RM16_imm16(const X86::Instruction&) { TODO(); }
  155. void SoftCPU::ADD_RM16_imm8(const X86::Instruction&) { TODO(); }
  156. void SoftCPU::ADD_RM16_reg16(const X86::Instruction&) { TODO(); }
  157. void SoftCPU::ADD_RM32_imm32(const X86::Instruction&) { TODO(); }
  158. void SoftCPU::ADD_RM32_imm8(const X86::Instruction&) { TODO(); }
  159. void SoftCPU::ADD_RM32_reg32(const X86::Instruction&) { TODO(); }
  160. void SoftCPU::ADD_RM8_imm8(const X86::Instruction&) { TODO(); }
  161. void SoftCPU::ADD_RM8_reg8(const X86::Instruction&) { TODO(); }
  162. void SoftCPU::ADD_reg16_RM16(const X86::Instruction&) { TODO(); }
  163. void SoftCPU::ADD_reg32_RM32(const X86::Instruction&) { TODO(); }
  164. void SoftCPU::ADD_reg8_RM8(const X86::Instruction&) { TODO(); }
  165. void SoftCPU::AND_AL_imm8(const X86::Instruction&) { TODO(); }
  166. void SoftCPU::AND_AX_imm16(const X86::Instruction&) { TODO(); }
  167. void SoftCPU::AND_EAX_imm32(const X86::Instruction&) { TODO(); }
  168. void SoftCPU::AND_RM16_imm16(const X86::Instruction&) { TODO(); }
  169. void SoftCPU::AND_RM16_imm8(const X86::Instruction&) { TODO(); }
  170. void SoftCPU::AND_RM16_reg16(const X86::Instruction&) { TODO(); }
  171. void SoftCPU::AND_RM32_imm32(const X86::Instruction&) { TODO(); }
  172. void SoftCPU::AND_RM32_imm8(const X86::Instruction&) { TODO(); }
  173. void SoftCPU::AND_RM32_reg32(const X86::Instruction&) { TODO(); }
  174. void SoftCPU::AND_RM8_imm8(const X86::Instruction&) { TODO(); }
  175. void SoftCPU::AND_RM8_reg8(const X86::Instruction&) { TODO(); }
  176. void SoftCPU::AND_reg16_RM16(const X86::Instruction&) { TODO(); }
  177. void SoftCPU::AND_reg32_RM32(const X86::Instruction&) { TODO(); }
  178. void SoftCPU::AND_reg8_RM8(const X86::Instruction&) { TODO(); }
  179. void SoftCPU::ARPL(const X86::Instruction&) { TODO(); }
  180. void SoftCPU::BOUND(const X86::Instruction&) { TODO(); }
  181. void SoftCPU::BSF_reg16_RM16(const X86::Instruction&) { TODO(); }
  182. void SoftCPU::BSF_reg32_RM32(const X86::Instruction&) { TODO(); }
  183. void SoftCPU::BSR_reg16_RM16(const X86::Instruction&) { TODO(); }
  184. void SoftCPU::BSR_reg32_RM32(const X86::Instruction&) { TODO(); }
  185. void SoftCPU::BSWAP_reg32(const X86::Instruction&) { TODO(); }
  186. void SoftCPU::BTC_RM16_imm8(const X86::Instruction&) { TODO(); }
  187. void SoftCPU::BTC_RM16_reg16(const X86::Instruction&) { TODO(); }
  188. void SoftCPU::BTC_RM32_imm8(const X86::Instruction&) { TODO(); }
  189. void SoftCPU::BTC_RM32_reg32(const X86::Instruction&) { TODO(); }
  190. void SoftCPU::BTR_RM16_imm8(const X86::Instruction&) { TODO(); }
  191. void SoftCPU::BTR_RM16_reg16(const X86::Instruction&) { TODO(); }
  192. void SoftCPU::BTR_RM32_imm8(const X86::Instruction&) { TODO(); }
  193. void SoftCPU::BTR_RM32_reg32(const X86::Instruction&) { TODO(); }
  194. void SoftCPU::BTS_RM16_imm8(const X86::Instruction&) { TODO(); }
  195. void SoftCPU::BTS_RM16_reg16(const X86::Instruction&) { TODO(); }
  196. void SoftCPU::BTS_RM32_imm8(const X86::Instruction&) { TODO(); }
  197. void SoftCPU::BTS_RM32_reg32(const X86::Instruction&) { TODO(); }
  198. void SoftCPU::BT_RM16_imm8(const X86::Instruction&) { TODO(); }
  199. void SoftCPU::BT_RM16_reg16(const X86::Instruction&) { TODO(); }
  200. void SoftCPU::BT_RM32_imm8(const X86::Instruction&) { TODO(); }
  201. void SoftCPU::BT_RM32_reg32(const X86::Instruction&) { TODO(); }
  202. void SoftCPU::CALL_FAR_mem16(const X86::Instruction&) { TODO(); }
  203. void SoftCPU::CALL_FAR_mem32(const X86::Instruction&) { TODO(); }
  204. void SoftCPU::CALL_RM16(const X86::Instruction&) { TODO(); }
  205. void SoftCPU::CALL_RM32(const X86::Instruction&) { TODO(); }
  206. void SoftCPU::CALL_imm16(const X86::Instruction&) { TODO(); }
  207. void SoftCPU::CALL_imm16_imm16(const X86::Instruction&) { TODO(); }
  208. void SoftCPU::CALL_imm16_imm32(const X86::Instruction&) { TODO(); }
  209. void SoftCPU::CALL_imm32(const X86::Instruction&) { TODO(); }
  210. void SoftCPU::CBW(const X86::Instruction&) { TODO(); }
  211. void SoftCPU::CDQ(const X86::Instruction&) { TODO(); }
  212. void SoftCPU::CLC(const X86::Instruction&) { TODO(); }
  213. void SoftCPU::CLD(const X86::Instruction&) { TODO(); }
  214. void SoftCPU::CLI(const X86::Instruction&) { TODO(); }
  215. void SoftCPU::CLTS(const X86::Instruction&) { TODO(); }
  216. void SoftCPU::CMC(const X86::Instruction&) { TODO(); }
  217. void SoftCPU::CMOVcc_reg16_RM16(const X86::Instruction&) { TODO(); }
  218. void SoftCPU::CMOVcc_reg32_RM32(const X86::Instruction&) { TODO(); }
  219. void SoftCPU::CMPSB(const X86::Instruction&) { TODO(); }
  220. void SoftCPU::CMPSD(const X86::Instruction&) { TODO(); }
  221. void SoftCPU::CMPSW(const X86::Instruction&) { TODO(); }
  222. void SoftCPU::CMPXCHG_RM16_reg16(const X86::Instruction&) { TODO(); }
  223. void SoftCPU::CMPXCHG_RM32_reg32(const X86::Instruction&) { TODO(); }
  224. void SoftCPU::CMPXCHG_RM8_reg8(const X86::Instruction&) { TODO(); }
  225. void SoftCPU::CMP_AL_imm8(const X86::Instruction&) { TODO(); }
  226. void SoftCPU::CMP_AX_imm16(const X86::Instruction&) { TODO(); }
  227. void SoftCPU::CMP_EAX_imm32(const X86::Instruction&) { TODO(); }
  228. void SoftCPU::CMP_RM16_imm16(const X86::Instruction&) { TODO(); }
  229. void SoftCPU::CMP_RM16_imm8(const X86::Instruction&) { TODO(); }
  230. void SoftCPU::CMP_RM16_reg16(const X86::Instruction&) { TODO(); }
  231. void SoftCPU::CMP_RM32_imm32(const X86::Instruction&) { TODO(); }
  232. void SoftCPU::CMP_RM32_imm8(const X86::Instruction&) { TODO(); }
  233. void SoftCPU::CMP_RM32_reg32(const X86::Instruction&) { TODO(); }
  234. void SoftCPU::CMP_RM8_imm8(const X86::Instruction&) { TODO(); }
  235. void SoftCPU::CMP_RM8_reg8(const X86::Instruction&) { TODO(); }
  236. void SoftCPU::CMP_reg16_RM16(const X86::Instruction&) { TODO(); }
  237. void SoftCPU::CMP_reg32_RM32(const X86::Instruction&) { TODO(); }
  238. void SoftCPU::CMP_reg8_RM8(const X86::Instruction&) { TODO(); }
  239. void SoftCPU::CPUID(const X86::Instruction&) { TODO(); }
  240. void SoftCPU::CWD(const X86::Instruction&) { TODO(); }
  241. void SoftCPU::CWDE(const X86::Instruction&) { TODO(); }
  242. void SoftCPU::DAA(const X86::Instruction&) { TODO(); }
  243. void SoftCPU::DAS(const X86::Instruction&) { TODO(); }
  244. void SoftCPU::DEC_RM16(const X86::Instruction&) { TODO(); }
  245. void SoftCPU::DEC_RM32(const X86::Instruction&) { TODO(); }
  246. void SoftCPU::DEC_RM8(const X86::Instruction&) { TODO(); }
  247. void SoftCPU::DEC_reg16(const X86::Instruction&) { TODO(); }
  248. void SoftCPU::DEC_reg32(const X86::Instruction&) { TODO(); }
  249. void SoftCPU::DIV_RM16(const X86::Instruction&) { TODO(); }
  250. void SoftCPU::DIV_RM32(const X86::Instruction&) { TODO(); }
  251. void SoftCPU::DIV_RM8(const X86::Instruction&) { TODO(); }
  252. void SoftCPU::ENTER16(const X86::Instruction&) { TODO(); }
  253. void SoftCPU::ENTER32(const X86::Instruction&) { TODO(); }
  254. void SoftCPU::ESCAPE(const X86::Instruction&) { TODO(); }
  255. void SoftCPU::HLT(const X86::Instruction&) { TODO(); }
  256. void SoftCPU::IDIV_RM16(const X86::Instruction&) { TODO(); }
  257. void SoftCPU::IDIV_RM32(const X86::Instruction&) { TODO(); }
  258. void SoftCPU::IDIV_RM8(const X86::Instruction&) { TODO(); }
  259. void SoftCPU::IMUL_RM16(const X86::Instruction&) { TODO(); }
  260. void SoftCPU::IMUL_RM32(const X86::Instruction&) { TODO(); }
  261. void SoftCPU::IMUL_RM8(const X86::Instruction&) { TODO(); }
  262. void SoftCPU::IMUL_reg16_RM16(const X86::Instruction&) { TODO(); }
  263. void SoftCPU::IMUL_reg16_RM16_imm16(const X86::Instruction&) { TODO(); }
  264. void SoftCPU::IMUL_reg16_RM16_imm8(const X86::Instruction&) { TODO(); }
  265. void SoftCPU::IMUL_reg32_RM32(const X86::Instruction&) { TODO(); }
  266. void SoftCPU::IMUL_reg32_RM32_imm32(const X86::Instruction&) { TODO(); }
  267. void SoftCPU::IMUL_reg32_RM32_imm8(const X86::Instruction&) { TODO(); }
  268. void SoftCPU::INC_RM16(const X86::Instruction&) { TODO(); }
  269. void SoftCPU::INC_RM32(const X86::Instruction&) { TODO(); }
  270. void SoftCPU::INC_RM8(const X86::Instruction&) { TODO(); }
  271. void SoftCPU::INC_reg16(const X86::Instruction&) { TODO(); }
  272. void SoftCPU::INC_reg32(const X86::Instruction&) { TODO(); }
  273. void SoftCPU::INSB(const X86::Instruction&) { TODO(); }
  274. void SoftCPU::INSD(const X86::Instruction&) { TODO(); }
  275. void SoftCPU::INSW(const X86::Instruction&) { TODO(); }
  276. void SoftCPU::INT3(const X86::Instruction&) { TODO(); }
  277. void SoftCPU::INTO(const X86::Instruction&) { TODO(); }
  278. void SoftCPU::INT_imm8(const X86::Instruction& insn)
  279. {
  280. ASSERT(insn.imm8() == 0x82);
  281. set_eax(m_emulator.virt_syscall(eax(), edx(), ecx(), ebx()));
  282. }
  283. void SoftCPU::INVLPG(const X86::Instruction&) { TODO(); }
  284. void SoftCPU::IN_AL_DX(const X86::Instruction&) { TODO(); }
  285. void SoftCPU::IN_AL_imm8(const X86::Instruction&) { TODO(); }
  286. void SoftCPU::IN_AX_DX(const X86::Instruction&) { TODO(); }
  287. void SoftCPU::IN_AX_imm8(const X86::Instruction&) { TODO(); }
  288. void SoftCPU::IN_EAX_DX(const X86::Instruction&) { TODO(); }
  289. void SoftCPU::IN_EAX_imm8(const X86::Instruction&) { TODO(); }
  290. void SoftCPU::IRET(const X86::Instruction&) { TODO(); }
  291. void SoftCPU::JCXZ_imm8(const X86::Instruction&) { TODO(); }
  292. void SoftCPU::JMP_FAR_mem16(const X86::Instruction&) { TODO(); }
  293. void SoftCPU::JMP_FAR_mem32(const X86::Instruction&) { TODO(); }
  294. void SoftCPU::JMP_RM16(const X86::Instruction&) { TODO(); }
  295. void SoftCPU::JMP_RM32(const X86::Instruction&) { TODO(); }
  296. void SoftCPU::JMP_imm16(const X86::Instruction&) { TODO(); }
  297. void SoftCPU::JMP_imm16_imm16(const X86::Instruction&) { TODO(); }
  298. void SoftCPU::JMP_imm16_imm32(const X86::Instruction&) { TODO(); }
  299. void SoftCPU::JMP_imm32(const X86::Instruction&) { TODO(); }
  300. void SoftCPU::JMP_short_imm8(const X86::Instruction&) { TODO(); }
  301. void SoftCPU::Jcc_NEAR_imm(const X86::Instruction&) { TODO(); }
  302. void SoftCPU::Jcc_imm8(const X86::Instruction&) { TODO(); }
  303. void SoftCPU::LAHF(const X86::Instruction&) { TODO(); }
  304. void SoftCPU::LAR_reg16_RM16(const X86::Instruction&) { TODO(); }
  305. void SoftCPU::LAR_reg32_RM32(const X86::Instruction&) { TODO(); }
  306. void SoftCPU::LDS_reg16_mem16(const X86::Instruction&) { TODO(); }
  307. void SoftCPU::LDS_reg32_mem32(const X86::Instruction&) { TODO(); }
  308. void SoftCPU::LEAVE16(const X86::Instruction&) { TODO(); }
  309. void SoftCPU::LEAVE32(const X86::Instruction&) { TODO(); }
  310. void SoftCPU::LEA_reg16_mem16(const X86::Instruction&) { TODO(); }
  311. void SoftCPU::LEA_reg32_mem32(const X86::Instruction&) { TODO(); }
  312. void SoftCPU::LES_reg16_mem16(const X86::Instruction&) { TODO(); }
  313. void SoftCPU::LES_reg32_mem32(const X86::Instruction&) { TODO(); }
  314. void SoftCPU::LFS_reg16_mem16(const X86::Instruction&) { TODO(); }
  315. void SoftCPU::LFS_reg32_mem32(const X86::Instruction&) { TODO(); }
  316. void SoftCPU::LGDT(const X86::Instruction&) { TODO(); }
  317. void SoftCPU::LGS_reg16_mem16(const X86::Instruction&) { TODO(); }
  318. void SoftCPU::LGS_reg32_mem32(const X86::Instruction&) { TODO(); }
  319. void SoftCPU::LIDT(const X86::Instruction&) { TODO(); }
  320. void SoftCPU::LLDT_RM16(const X86::Instruction&) { TODO(); }
  321. void SoftCPU::LMSW_RM16(const X86::Instruction&) { TODO(); }
  322. void SoftCPU::LODSB(const X86::Instruction&) { TODO(); }
  323. void SoftCPU::LODSD(const X86::Instruction&) { TODO(); }
  324. void SoftCPU::LODSW(const X86::Instruction&) { TODO(); }
  325. void SoftCPU::LOOPNZ_imm8(const X86::Instruction&) { TODO(); }
  326. void SoftCPU::LOOPZ_imm8(const X86::Instruction&) { TODO(); }
  327. void SoftCPU::LOOP_imm8(const X86::Instruction&) { TODO(); }
  328. void SoftCPU::LSL_reg16_RM16(const X86::Instruction&) { TODO(); }
  329. void SoftCPU::LSL_reg32_RM32(const X86::Instruction&) { TODO(); }
  330. void SoftCPU::LSS_reg16_mem16(const X86::Instruction&) { TODO(); }
  331. void SoftCPU::LSS_reg32_mem32(const X86::Instruction&) { TODO(); }
  332. void SoftCPU::LTR_RM16(const X86::Instruction&) { TODO(); }
  333. void SoftCPU::MOVSB(const X86::Instruction&) { TODO(); }
  334. void SoftCPU::MOVSD(const X86::Instruction&) { TODO(); }
  335. void SoftCPU::MOVSW(const X86::Instruction&) { TODO(); }
  336. void SoftCPU::MOVSX_reg16_RM8(const X86::Instruction&) { TODO(); }
  337. void SoftCPU::MOVSX_reg32_RM16(const X86::Instruction&) { TODO(); }
  338. void SoftCPU::MOVSX_reg32_RM8(const X86::Instruction&) { TODO(); }
  339. void SoftCPU::MOVZX_reg16_RM8(const X86::Instruction&) { TODO(); }
  340. void SoftCPU::MOVZX_reg32_RM16(const X86::Instruction&) { TODO(); }
  341. void SoftCPU::MOVZX_reg32_RM8(const X86::Instruction&) { TODO(); }
  342. void SoftCPU::MOV_AL_moff8(const X86::Instruction&) { TODO(); }
  343. void SoftCPU::MOV_AX_moff16(const X86::Instruction&) { TODO(); }
  344. void SoftCPU::MOV_CR_reg32(const X86::Instruction&) { TODO(); }
  345. void SoftCPU::MOV_DR_reg32(const X86::Instruction&) { TODO(); }
  346. void SoftCPU::MOV_EAX_moff32(const X86::Instruction&) { TODO(); }
  347. void SoftCPU::MOV_RM16_imm16(const X86::Instruction&) { TODO(); }
  348. void SoftCPU::MOV_RM16_reg16(const X86::Instruction&) { TODO(); }
  349. void SoftCPU::MOV_RM16_seg(const X86::Instruction&) { TODO(); }
  350. void SoftCPU::MOV_RM32_imm32(const X86::Instruction&) { TODO(); }
  351. void SoftCPU::MOV_RM32_reg32(const X86::Instruction& insn)
  352. {
  353. ASSERT(insn.modrm().is_register());
  354. gpr32(insn.modrm().reg32()) = gpr32(insn.reg32());
  355. }
  356. void SoftCPU::MOV_RM8_imm8(const X86::Instruction&) { TODO(); }
  357. void SoftCPU::MOV_RM8_reg8(const X86::Instruction&) { TODO(); }
  358. void SoftCPU::MOV_moff16_AX(const X86::Instruction&) { TODO(); }
  359. void SoftCPU::MOV_moff32_EAX(const X86::Instruction&) { TODO(); }
  360. void SoftCPU::MOV_moff8_AL(const X86::Instruction&) { TODO(); }
  361. void SoftCPU::MOV_reg16_RM16(const X86::Instruction&) { TODO(); }
  362. void SoftCPU::MOV_reg16_imm16(const X86::Instruction&) { TODO(); }
  363. void SoftCPU::MOV_reg32_CR(const X86::Instruction&) { TODO(); }
  364. void SoftCPU::MOV_reg32_DR(const X86::Instruction&) { TODO(); }
  365. void SoftCPU::MOV_reg32_RM32(const X86::Instruction&) { TODO(); }
  366. void SoftCPU::MOV_reg32_imm32(const X86::Instruction& insn)
  367. {
  368. gpr32(insn.reg32()) = insn.imm32();
  369. }
  370. void SoftCPU::MOV_reg8_RM8(const X86::Instruction&) { TODO(); }
  371. void SoftCPU::MOV_reg8_imm8(const X86::Instruction&) { TODO(); }
  372. void SoftCPU::MOV_seg_RM16(const X86::Instruction&) { TODO(); }
  373. void SoftCPU::MOV_seg_RM32(const X86::Instruction&) { TODO(); }
  374. void SoftCPU::MUL_RM16(const X86::Instruction&) { TODO(); }
  375. void SoftCPU::MUL_RM32(const X86::Instruction&) { TODO(); }
  376. void SoftCPU::MUL_RM8(const X86::Instruction&) { TODO(); }
  377. void SoftCPU::NEG_RM16(const X86::Instruction&) { TODO(); }
  378. void SoftCPU::NEG_RM32(const X86::Instruction&) { TODO(); }
  379. void SoftCPU::NEG_RM8(const X86::Instruction&) { TODO(); }
  380. void SoftCPU::NOP(const X86::Instruction&) { TODO(); }
  381. void SoftCPU::NOT_RM16(const X86::Instruction&) { TODO(); }
  382. void SoftCPU::NOT_RM32(const X86::Instruction&) { TODO(); }
  383. void SoftCPU::NOT_RM8(const X86::Instruction&) { TODO(); }
  384. void SoftCPU::OR_AL_imm8(const X86::Instruction&) { TODO(); }
  385. void SoftCPU::OR_AX_imm16(const X86::Instruction&) { TODO(); }
  386. void SoftCPU::OR_EAX_imm32(const X86::Instruction&) { TODO(); }
  387. void SoftCPU::OR_RM16_imm16(const X86::Instruction&) { TODO(); }
  388. void SoftCPU::OR_RM16_imm8(const X86::Instruction&) { TODO(); }
  389. void SoftCPU::OR_RM16_reg16(const X86::Instruction&) { TODO(); }
  390. void SoftCPU::OR_RM32_imm32(const X86::Instruction&) { TODO(); }
  391. void SoftCPU::OR_RM32_imm8(const X86::Instruction&) { TODO(); }
  392. void SoftCPU::OR_RM32_reg32(const X86::Instruction&) { TODO(); }
  393. void SoftCPU::OR_RM8_imm8(const X86::Instruction&) { TODO(); }
  394. void SoftCPU::OR_RM8_reg8(const X86::Instruction&) { TODO(); }
  395. void SoftCPU::OR_reg16_RM16(const X86::Instruction&) { TODO(); }
  396. void SoftCPU::OR_reg32_RM32(const X86::Instruction&) { TODO(); }
  397. void SoftCPU::OR_reg8_RM8(const X86::Instruction&) { TODO(); }
  398. void SoftCPU::OUTSB(const X86::Instruction&) { TODO(); }
  399. void SoftCPU::OUTSD(const X86::Instruction&) { TODO(); }
  400. void SoftCPU::OUTSW(const X86::Instruction&) { TODO(); }
  401. void SoftCPU::OUT_DX_AL(const X86::Instruction&) { TODO(); }
  402. void SoftCPU::OUT_DX_AX(const X86::Instruction&) { TODO(); }
  403. void SoftCPU::OUT_DX_EAX(const X86::Instruction&) { TODO(); }
  404. void SoftCPU::OUT_imm8_AL(const X86::Instruction&) { TODO(); }
  405. void SoftCPU::OUT_imm8_AX(const X86::Instruction&) { TODO(); }
  406. void SoftCPU::OUT_imm8_EAX(const X86::Instruction&) { TODO(); }
  407. void SoftCPU::PADDB_mm1_mm2m64(const X86::Instruction&) { TODO(); }
  408. void SoftCPU::PADDW_mm1_mm2m64(const X86::Instruction&) { TODO(); }
  409. void SoftCPU::PADDD_mm1_mm2m64(const X86::Instruction&) { TODO(); }
  410. void SoftCPU::POPA(const X86::Instruction&) { TODO(); }
  411. void SoftCPU::POPAD(const X86::Instruction&) { TODO(); }
  412. void SoftCPU::POPF(const X86::Instruction&) { TODO(); }
  413. void SoftCPU::POPFD(const X86::Instruction&) { TODO(); }
  414. void SoftCPU::POP_DS(const X86::Instruction&) { TODO(); }
  415. void SoftCPU::POP_ES(const X86::Instruction&) { TODO(); }
  416. void SoftCPU::POP_FS(const X86::Instruction&) { TODO(); }
  417. void SoftCPU::POP_GS(const X86::Instruction&) { TODO(); }
  418. void SoftCPU::POP_RM16(const X86::Instruction&) { TODO(); }
  419. void SoftCPU::POP_RM32(const X86::Instruction&) { TODO(); }
  420. void SoftCPU::POP_SS(const X86::Instruction&) { TODO(); }
  421. void SoftCPU::POP_reg16(const X86::Instruction&) { TODO(); }
  422. void SoftCPU::POP_reg32(const X86::Instruction& insn)
  423. {
  424. gpr32(insn.reg32()) = pop32();
  425. }
  426. void SoftCPU::PUSHA(const X86::Instruction&) { TODO(); }
  427. void SoftCPU::PUSHAD(const X86::Instruction&) { TODO(); }
  428. void SoftCPU::PUSHF(const X86::Instruction&) { TODO(); }
  429. void SoftCPU::PUSHFD(const X86::Instruction&) { TODO(); }
  430. void SoftCPU::PUSH_CS(const X86::Instruction&) { TODO(); }
  431. void SoftCPU::PUSH_DS(const X86::Instruction&) { TODO(); }
  432. void SoftCPU::PUSH_ES(const X86::Instruction&) { TODO(); }
  433. void SoftCPU::PUSH_FS(const X86::Instruction&) { TODO(); }
  434. void SoftCPU::PUSH_GS(const X86::Instruction&) { TODO(); }
  435. void SoftCPU::PUSH_RM16(const X86::Instruction&) { TODO(); }
  436. void SoftCPU::PUSH_RM32(const X86::Instruction&) { TODO(); }
  437. void SoftCPU::PUSH_SP_8086_80186(const X86::Instruction&) { TODO(); }
  438. void SoftCPU::PUSH_SS(const X86::Instruction&) { TODO(); }
  439. void SoftCPU::PUSH_imm16(const X86::Instruction&) { TODO(); }
  440. void SoftCPU::PUSH_imm32(const X86::Instruction&) { TODO(); }
  441. void SoftCPU::PUSH_imm8(const X86::Instruction&) { TODO(); }
  442. void SoftCPU::PUSH_reg16(const X86::Instruction&) { TODO(); }
  443. void SoftCPU::PUSH_reg32(const X86::Instruction& insn)
  444. {
  445. push32(gpr32(insn.reg32()));
  446. }
  447. void SoftCPU::RCL_RM16_1(const X86::Instruction&) { TODO(); }
  448. void SoftCPU::RCL_RM16_CL(const X86::Instruction&) { TODO(); }
  449. void SoftCPU::RCL_RM16_imm8(const X86::Instruction&) { TODO(); }
  450. void SoftCPU::RCL_RM32_1(const X86::Instruction&) { TODO(); }
  451. void SoftCPU::RCL_RM32_CL(const X86::Instruction&) { TODO(); }
  452. void SoftCPU::RCL_RM32_imm8(const X86::Instruction&) { TODO(); }
  453. void SoftCPU::RCL_RM8_1(const X86::Instruction&) { TODO(); }
  454. void SoftCPU::RCL_RM8_CL(const X86::Instruction&) { TODO(); }
  455. void SoftCPU::RCL_RM8_imm8(const X86::Instruction&) { TODO(); }
  456. void SoftCPU::RCR_RM16_1(const X86::Instruction&) { TODO(); }
  457. void SoftCPU::RCR_RM16_CL(const X86::Instruction&) { TODO(); }
  458. void SoftCPU::RCR_RM16_imm8(const X86::Instruction&) { TODO(); }
  459. void SoftCPU::RCR_RM32_1(const X86::Instruction&) { TODO(); }
  460. void SoftCPU::RCR_RM32_CL(const X86::Instruction&) { TODO(); }
  461. void SoftCPU::RCR_RM32_imm8(const X86::Instruction&) { TODO(); }
  462. void SoftCPU::RCR_RM8_1(const X86::Instruction&) { TODO(); }
  463. void SoftCPU::RCR_RM8_CL(const X86::Instruction&) { TODO(); }
  464. void SoftCPU::RCR_RM8_imm8(const X86::Instruction&) { TODO(); }
  465. void SoftCPU::RDTSC(const X86::Instruction&) { TODO(); }
  466. void SoftCPU::RET(const X86::Instruction&) { TODO(); }
  467. void SoftCPU::RETF(const X86::Instruction&) { TODO(); }
  468. void SoftCPU::RETF_imm16(const X86::Instruction&) { TODO(); }
  469. void SoftCPU::RET_imm16(const X86::Instruction&) { TODO(); }
  470. void SoftCPU::ROL_RM16_1(const X86::Instruction&) { TODO(); }
  471. void SoftCPU::ROL_RM16_CL(const X86::Instruction&) { TODO(); }
  472. void SoftCPU::ROL_RM16_imm8(const X86::Instruction&) { TODO(); }
  473. void SoftCPU::ROL_RM32_1(const X86::Instruction&) { TODO(); }
  474. void SoftCPU::ROL_RM32_CL(const X86::Instruction&) { TODO(); }
  475. void SoftCPU::ROL_RM32_imm8(const X86::Instruction&) { TODO(); }
  476. void SoftCPU::ROL_RM8_1(const X86::Instruction&) { TODO(); }
  477. void SoftCPU::ROL_RM8_CL(const X86::Instruction&) { TODO(); }
  478. void SoftCPU::ROL_RM8_imm8(const X86::Instruction&) { TODO(); }
  479. void SoftCPU::ROR_RM16_1(const X86::Instruction&) { TODO(); }
  480. void SoftCPU::ROR_RM16_CL(const X86::Instruction&) { TODO(); }
  481. void SoftCPU::ROR_RM16_imm8(const X86::Instruction&) { TODO(); }
  482. void SoftCPU::ROR_RM32_1(const X86::Instruction&) { TODO(); }
  483. void SoftCPU::ROR_RM32_CL(const X86::Instruction&) { TODO(); }
  484. void SoftCPU::ROR_RM32_imm8(const X86::Instruction&) { TODO(); }
  485. void SoftCPU::ROR_RM8_1(const X86::Instruction&) { TODO(); }
  486. void SoftCPU::ROR_RM8_CL(const X86::Instruction&) { TODO(); }
  487. void SoftCPU::ROR_RM8_imm8(const X86::Instruction&) { TODO(); }
  488. void SoftCPU::SAHF(const X86::Instruction&) { TODO(); }
  489. void SoftCPU::SALC(const X86::Instruction&) { TODO(); }
  490. void SoftCPU::SAR_RM16_1(const X86::Instruction&) { TODO(); }
  491. void SoftCPU::SAR_RM16_CL(const X86::Instruction&) { TODO(); }
  492. void SoftCPU::SAR_RM16_imm8(const X86::Instruction&) { TODO(); }
  493. void SoftCPU::SAR_RM32_1(const X86::Instruction&) { TODO(); }
  494. void SoftCPU::SAR_RM32_CL(const X86::Instruction&) { TODO(); }
  495. void SoftCPU::SAR_RM32_imm8(const X86::Instruction&) { TODO(); }
  496. void SoftCPU::SAR_RM8_1(const X86::Instruction&) { TODO(); }
  497. void SoftCPU::SAR_RM8_CL(const X86::Instruction&) { TODO(); }
  498. void SoftCPU::SAR_RM8_imm8(const X86::Instruction&) { TODO(); }
  499. void SoftCPU::SBB_AL_imm8(const X86::Instruction&) { TODO(); }
  500. void SoftCPU::SBB_AX_imm16(const X86::Instruction&) { TODO(); }
  501. void SoftCPU::SBB_EAX_imm32(const X86::Instruction&) { TODO(); }
  502. void SoftCPU::SBB_RM16_imm16(const X86::Instruction&) { TODO(); }
  503. void SoftCPU::SBB_RM16_imm8(const X86::Instruction&) { TODO(); }
  504. void SoftCPU::SBB_RM16_reg16(const X86::Instruction&) { TODO(); }
  505. void SoftCPU::SBB_RM32_imm32(const X86::Instruction&) { TODO(); }
  506. void SoftCPU::SBB_RM32_imm8(const X86::Instruction&) { TODO(); }
  507. void SoftCPU::SBB_RM32_reg32(const X86::Instruction&) { TODO(); }
  508. void SoftCPU::SBB_RM8_imm8(const X86::Instruction&) { TODO(); }
  509. void SoftCPU::SBB_RM8_reg8(const X86::Instruction&) { TODO(); }
  510. void SoftCPU::SBB_reg16_RM16(const X86::Instruction&) { TODO(); }
  511. void SoftCPU::SBB_reg32_RM32(const X86::Instruction&) { TODO(); }
  512. void SoftCPU::SBB_reg8_RM8(const X86::Instruction&) { TODO(); }
  513. void SoftCPU::SCASB(const X86::Instruction&) { TODO(); }
  514. void SoftCPU::SCASD(const X86::Instruction&) { TODO(); }
  515. void SoftCPU::SCASW(const X86::Instruction&) { TODO(); }
  516. void SoftCPU::SETcc_RM8(const X86::Instruction&) { TODO(); }
  517. void SoftCPU::SGDT(const X86::Instruction&) { TODO(); }
  518. void SoftCPU::SHLD_RM16_reg16_CL(const X86::Instruction&) { TODO(); }
  519. void SoftCPU::SHLD_RM16_reg16_imm8(const X86::Instruction&) { TODO(); }
  520. void SoftCPU::SHLD_RM32_reg32_CL(const X86::Instruction&) { TODO(); }
  521. void SoftCPU::SHLD_RM32_reg32_imm8(const X86::Instruction&) { TODO(); }
  522. void SoftCPU::SHL_RM16_1(const X86::Instruction&) { TODO(); }
  523. void SoftCPU::SHL_RM16_CL(const X86::Instruction&) { TODO(); }
  524. void SoftCPU::SHL_RM16_imm8(const X86::Instruction&) { TODO(); }
  525. void SoftCPU::SHL_RM32_1(const X86::Instruction&) { TODO(); }
  526. void SoftCPU::SHL_RM32_CL(const X86::Instruction&) { TODO(); }
  527. void SoftCPU::SHL_RM32_imm8(const X86::Instruction&) { TODO(); }
  528. void SoftCPU::SHL_RM8_1(const X86::Instruction&) { TODO(); }
  529. void SoftCPU::SHL_RM8_CL(const X86::Instruction&) { TODO(); }
  530. void SoftCPU::SHL_RM8_imm8(const X86::Instruction&) { TODO(); }
  531. void SoftCPU::SHRD_RM16_reg16_CL(const X86::Instruction&) { TODO(); }
  532. void SoftCPU::SHRD_RM16_reg16_imm8(const X86::Instruction&) { TODO(); }
  533. void SoftCPU::SHRD_RM32_reg32_CL(const X86::Instruction&) { TODO(); }
  534. void SoftCPU::SHRD_RM32_reg32_imm8(const X86::Instruction&) { TODO(); }
  535. void SoftCPU::SHR_RM16_1(const X86::Instruction&) { TODO(); }
  536. void SoftCPU::SHR_RM16_CL(const X86::Instruction&) { TODO(); }
  537. void SoftCPU::SHR_RM16_imm8(const X86::Instruction&) { TODO(); }
  538. void SoftCPU::SHR_RM32_1(const X86::Instruction&) { TODO(); }
  539. void SoftCPU::SHR_RM32_CL(const X86::Instruction&) { TODO(); }
  540. void SoftCPU::SHR_RM32_imm8(const X86::Instruction&) { TODO(); }
  541. void SoftCPU::SHR_RM8_1(const X86::Instruction&) { TODO(); }
  542. void SoftCPU::SHR_RM8_CL(const X86::Instruction&) { TODO(); }
  543. void SoftCPU::SHR_RM8_imm8(const X86::Instruction&) { TODO(); }
  544. void SoftCPU::SIDT(const X86::Instruction&) { TODO(); }
  545. void SoftCPU::SLDT_RM16(const X86::Instruction&) { TODO(); }
  546. void SoftCPU::SMSW_RM16(const X86::Instruction&) { TODO(); }
  547. void SoftCPU::STC(const X86::Instruction&) { TODO(); }
  548. void SoftCPU::STD(const X86::Instruction&) { TODO(); }
  549. void SoftCPU::STI(const X86::Instruction&) { TODO(); }
  550. void SoftCPU::STOSB(const X86::Instruction&) { TODO(); }
  551. void SoftCPU::STOSD(const X86::Instruction&) { TODO(); }
  552. void SoftCPU::STOSW(const X86::Instruction&) { TODO(); }
  553. void SoftCPU::STR_RM16(const X86::Instruction&) { TODO(); }
  554. void SoftCPU::SUB_AL_imm8(const X86::Instruction&) { TODO(); }
  555. void SoftCPU::SUB_AX_imm16(const X86::Instruction&) { TODO(); }
  556. void SoftCPU::SUB_EAX_imm32(const X86::Instruction&) { TODO(); }
  557. void SoftCPU::SUB_RM16_imm16(const X86::Instruction&) { TODO(); }
  558. void SoftCPU::SUB_RM16_imm8(const X86::Instruction&) { TODO(); }
  559. void SoftCPU::SUB_RM16_reg16(const X86::Instruction&) { TODO(); }
  560. void SoftCPU::SUB_RM32_imm32(const X86::Instruction&) { TODO(); }
  561. void SoftCPU::SUB_RM32_imm8(const X86::Instruction&) { TODO(); }
  562. void SoftCPU::SUB_RM32_reg32(const X86::Instruction&) { TODO(); }
  563. void SoftCPU::SUB_RM8_imm8(const X86::Instruction&) { TODO(); }
  564. void SoftCPU::SUB_RM8_reg8(const X86::Instruction&) { TODO(); }
  565. void SoftCPU::SUB_reg16_RM16(const X86::Instruction&) { TODO(); }
  566. void SoftCPU::SUB_reg32_RM32(const X86::Instruction&) { TODO(); }
  567. void SoftCPU::SUB_reg8_RM8(const X86::Instruction&) { TODO(); }
  568. void SoftCPU::TEST_AL_imm8(const X86::Instruction&) { TODO(); }
  569. void SoftCPU::TEST_AX_imm16(const X86::Instruction&) { TODO(); }
  570. void SoftCPU::TEST_EAX_imm32(const X86::Instruction&) { TODO(); }
  571. void SoftCPU::TEST_RM16_imm16(const X86::Instruction&) { TODO(); }
  572. void SoftCPU::TEST_RM16_reg16(const X86::Instruction&) { TODO(); }
  573. void SoftCPU::TEST_RM32_imm32(const X86::Instruction&) { TODO(); }
  574. void SoftCPU::TEST_RM32_reg32(const X86::Instruction&) { TODO(); }
  575. void SoftCPU::TEST_RM8_imm8(const X86::Instruction&) { TODO(); }
  576. void SoftCPU::TEST_RM8_reg8(const X86::Instruction&) { TODO(); }
  577. void SoftCPU::UD0(const X86::Instruction&) { TODO(); }
  578. void SoftCPU::UD1(const X86::Instruction&) { TODO(); }
  579. void SoftCPU::UD2(const X86::Instruction&) { TODO(); }
  580. void SoftCPU::VERR_RM16(const X86::Instruction&) { TODO(); }
  581. void SoftCPU::VERW_RM16(const X86::Instruction&) { TODO(); }
  582. void SoftCPU::WAIT(const X86::Instruction&) { TODO(); }
  583. void SoftCPU::WBINVD(const X86::Instruction&) { TODO(); }
  584. void SoftCPU::XADD_RM16_reg16(const X86::Instruction&) { TODO(); }
  585. void SoftCPU::XADD_RM32_reg32(const X86::Instruction&) { TODO(); }
  586. void SoftCPU::XADD_RM8_reg8(const X86::Instruction&) { TODO(); }
  587. void SoftCPU::XCHG_AX_reg16(const X86::Instruction&) { TODO(); }
  588. void SoftCPU::XCHG_EAX_reg32(const X86::Instruction&) { TODO(); }
  589. void SoftCPU::XCHG_reg16_RM16(const X86::Instruction&) { TODO(); }
  590. void SoftCPU::XCHG_reg32_RM32(const X86::Instruction&) { TODO(); }
  591. void SoftCPU::XCHG_reg8_RM8(const X86::Instruction&) { TODO(); }
  592. void SoftCPU::XLAT(const X86::Instruction&) { TODO(); }
  593. void SoftCPU::XOR_AL_imm8(const X86::Instruction&)
  594. {
  595. TODO();
  596. }
  597. void SoftCPU::XOR_AX_imm16(const X86::Instruction&) { TODO(); }
  598. void SoftCPU::XOR_EAX_imm32(const X86::Instruction&) { TODO(); }
  599. void SoftCPU::XOR_RM16_imm16(const X86::Instruction&) { TODO(); }
  600. void SoftCPU::XOR_RM16_imm8(const X86::Instruction&) { TODO(); }
  601. void SoftCPU::XOR_RM16_reg16(const X86::Instruction&) { TODO(); }
  602. void SoftCPU::XOR_RM32_imm32(const X86::Instruction& insn)
  603. {
  604. generic_RM32_imm32(op_xor<u32, u32>, insn);
  605. }
  606. void SoftCPU::XOR_RM32_imm8(const X86::Instruction& insn)
  607. {
  608. generic_RM32_imm8(op_xor<u32, u8>, insn);
  609. }
  610. void SoftCPU::XOR_RM32_reg32(const X86::Instruction& insn)
  611. {
  612. generic_RM32_reg32(op_xor<u32, u32>, insn);
  613. }
  614. void SoftCPU::XOR_RM8_imm8(const X86::Instruction&) { TODO(); }
  615. void SoftCPU::XOR_RM8_reg8(const X86::Instruction&) { TODO(); }
  616. void SoftCPU::XOR_reg16_RM16(const X86::Instruction&) { TODO(); }
  617. void SoftCPU::XOR_reg32_RM32(const X86::Instruction&) { TODO(); }
  618. void SoftCPU::XOR_reg8_RM8(const X86::Instruction&) { TODO(); }
  619. void SoftCPU::MOVQ_mm1_mm2m64(const X86::Instruction&) { TODO(); }
  620. void SoftCPU::EMMS(const X86::Instruction&) { TODO(); }
  621. void SoftCPU::MOVQ_mm1_m64_mm2(const X86::Instruction&) { TODO(); }
  622. void SoftCPU::wrap_0xC0(const X86::Instruction&) { TODO(); }
  623. void SoftCPU::wrap_0xC1_16(const X86::Instruction&) { TODO(); }
  624. void SoftCPU::wrap_0xC1_32(const X86::Instruction&) { TODO(); }
  625. void SoftCPU::wrap_0xD0(const X86::Instruction&) { TODO(); }
  626. void SoftCPU::wrap_0xD1_16(const X86::Instruction&) { TODO(); }
  627. void SoftCPU::wrap_0xD1_32(const X86::Instruction&) { TODO(); }
  628. void SoftCPU::wrap_0xD2(const X86::Instruction&) { TODO(); }
  629. void SoftCPU::wrap_0xD3_16(const X86::Instruction&) { TODO(); }
  630. void SoftCPU::wrap_0xD3_32(const X86::Instruction&) { TODO(); }
  631. }