mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-10-30 07:11:38 +00:00 
			
		
		
		
	Use __builtin_clz instead of __lzcnt32 for cntlzw instruction.
This commit is contained in:
		
							parent
							
								
									3280a7cf9f
								
							
						
					
					
						commit
						73b75e197a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -688,11 +688,11 @@ bool Recompiler::Recompile( | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case PPC_INST_CNTLZD: |     case PPC_INST_CNTLZD: | ||||||
|         println("\t{}.u64 = __lzcnt64({}.u64);", r(insn.operands[0]), r(insn.operands[1])); |         println("\t{0}.u64 = {1}.u64 == 0 ? 64 : __builtin_clzll({1}.u64);", r(insn.operands[0]), r(insn.operands[1])); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case PPC_INST_CNTLZW: |     case PPC_INST_CNTLZW: | ||||||
|         println("\t{}.u64 = __lzcnt32({}.u32);", r(insn.operands[0]), r(insn.operands[1])); |         println("\t{0}.u64 = {1}.u32 == 0 ? 32 : __builtin_clz({1}.u32);", r(insn.operands[0]), r(insn.operands[1])); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case PPC_INST_DB16CYC: |     case PPC_INST_DB16CYC: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Skyth
						Skyth