mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-10-30 07:11:38 +00:00 
			
		
		
		
	Use bitwise operations for fabs/fnabs/fneg.
This commit is contained in:
		
							parent
							
								
									989ed13d04
								
							
						
					
					
						commit
						7f43723ff0
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -408,7 +408,7 @@ bool Recompiler::Recompile(const Function& fn, uint32_t base, const ppc_insn& in | |||
| 
 | ||||
|     case PPC_INST_FABS: | ||||
|         println("\tctx.fpscr.setFlushMode(false);"); | ||||
|         println("\tctx.f{}.f64 = fabs(ctx.f{}.f64);", insn.operands[0], insn.operands[1]); | ||||
|         println("\tctx.f{}.u64 = ctx.f{}.u64 & ~0x8000000000000000;", insn.operands[0], insn.operands[1]); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_FADD: | ||||
|  | @ -493,12 +493,12 @@ bool Recompiler::Recompile(const Function& fn, uint32_t base, const ppc_insn& in | |||
| 
 | ||||
|     case PPC_INST_FNABS: | ||||
|         println("\tctx.fpscr.setFlushMode(false);"); | ||||
|         println("\tctx.f{}.f64 = -fabs(ctx.f{}.f64);", insn.operands[0], insn.operands[1]); | ||||
|         println("\tctx.f{}.u64 = ctx.f{}.u64 | 0x8000000000000000;", insn.operands[0], insn.operands[1]); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_FNEG: | ||||
|         println("\tctx.fpscr.setFlushMode(false);"); | ||||
|         println("\tctx.f{}.f64 = -ctx.f{}.f64;", insn.operands[0], insn.operands[1]); | ||||
|         println("\tctx.f{}.u64 = ctx.f{}.u64 ^ 0x8000000000000000;", insn.operands[0], insn.operands[1]); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_FNMADDS: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Skyth
						Skyth