mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:22:45 +00:00 
			
		
		
		
	UserspaceEmulator: First cut of generic instruction implementations
Let's use C++ templates to implement the generic parts of instructions. There are tons of them with the same set of inputs, just different behavior. Templates are perfect for this.
This commit is contained in:
		
							parent
							
								
									30ef30ca09
								
							
						
					
					
						commit
						f8b38eabeb
					
				
					 2 changed files with 92 additions and 13 deletions
				
			
		|  | @ -591,6 +591,13 @@ private: | |||
|     virtual void wrap_0xD3_16(const X86::Instruction&) override; | ||||
|     virtual void wrap_0xD3_32(const X86::Instruction&) override; | ||||
| 
 | ||||
|     template<typename Op> | ||||
|     void generic_RM32_reg32(Op, const X86::Instruction&); | ||||
|     template<typename Op> | ||||
|     void generic_RM32_imm32(Op, const X86::Instruction&); | ||||
|     template<typename Op> | ||||
|     void generic_RM32_imm8(Op, const X86::Instruction&); | ||||
| 
 | ||||
| private: | ||||
|     Emulator& m_emulator; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling