mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-10-30 07:11:38 +00:00 
			
		
		
		
	Apply bitmasks in vector shift operations.
This commit is contained in:
		
							parent
							
								
									e366e1eea9
								
							
						
					
					
						commit
						255ff2170e
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1572,7 +1572,7 @@ bool Recompiler::Recompile(const Function& fn, uint32_t base, const ppc_insn& in | |||
|     case PPC_INST_VSLW128: | ||||
|         // TODO: vectorize, ensure endianness is correct
 | ||||
|         for (size_t i = 0; i < 4; i++) | ||||
|             println("\tctx.v{}.u32[{}] = ctx.v{}.u32[{}] << ctx.v{}.u8[{}];", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|             println("\tctx.v{}.u32[{}] = ctx.v{}.u32[{}] << (ctx.v{}.u8[{}] & 0x1F);", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_VSPLTB: | ||||
|  | @ -1619,14 +1619,14 @@ bool Recompiler::Recompile(const Function& fn, uint32_t base, const ppc_insn& in | |||
|     case PPC_INST_VSRAW128: | ||||
|         // TODO: vectorize, ensure endianness is correct
 | ||||
|         for (size_t i = 0; i < 4; i++) | ||||
|             println("\tctx.v{}.s32[{}] = ctx.v{}.s32[{}] >> ctx.v{}.u8[{}];", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|             println("\tctx.v{}.s32[{}] = ctx.v{}.s32[{}] >> (ctx.v{}.u8[{}] & 0x1F);", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_VSRW: | ||||
|     case PPC_INST_VSRW128: | ||||
|         // TODO: vectorize, ensure endianness is correct
 | ||||
|         for (size_t i = 0; i < 4; i++) | ||||
|             println("\tctx.v{}.u32[{}] = ctx.v{}.u32[{}] >> ctx.v{}.u8[{}];", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|             println("\tctx.v{}.u32[{}] = ctx.v{}.u32[{}] >> (ctx.v{}.u8[{}] & 0x1F);", insn.operands[0], i, insn.operands[1], i, insn.operands[2], i * 4); | ||||
|         break; | ||||
| 
 | ||||
|     case PPC_INST_VSUBFP: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Skyth
						Skyth