mirror of
				https://github.com/ryujinx-mirror/ryujinx.git
				synced 2025-11-04 08:18:58 -06:00 
			
		
		
		
	Update StoreConstantToMemory to match StoreConstantToAddress on value read (#6642)
This commit is contained in:
		@@ -15,7 +15,8 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters
 | 
			
		||||
        private const int OffsetRegisterIndex = 6;
 | 
			
		||||
        private const int ValueImmediateIndex = 8;
 | 
			
		||||
 | 
			
		||||
        private const int ValueImmediateSize = 16;
 | 
			
		||||
        private const int ValueImmediateSize8 = 8;
 | 
			
		||||
        private const int ValueImmediateSize16 = 16;
 | 
			
		||||
 | 
			
		||||
        public static void Emit(byte[] instruction, CompilationContext context)
 | 
			
		||||
        {
 | 
			
		||||
@@ -31,7 +32,8 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters
 | 
			
		||||
            Register sourceRegister = context.GetRegister(instruction[AddressRegisterIndex]);
 | 
			
		||||
            byte incrementAddressRegister = instruction[IncrementAddressRegisterIndex];
 | 
			
		||||
            byte useOffsetRegister = instruction[UseOffsetRegisterIndex];
 | 
			
		||||
            ulong immediate = InstructionHelper.GetImmediate(instruction, ValueImmediateIndex, ValueImmediateSize);
 | 
			
		||||
            int valueImmediateSize = operationWidth <= 4 ? ValueImmediateSize8 : ValueImmediateSize16;
 | 
			
		||||
            ulong immediate = InstructionHelper.GetImmediate(instruction, ValueImmediateIndex, valueImmediateSize);
 | 
			
		||||
            Value<ulong> storeValue = new(immediate);
 | 
			
		||||
 | 
			
		||||
            Pointer destinationMemory;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user