<commit_before>﻿/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  <NAME> (rootnode) <<EMAIL>>
 */

using System;
using System.Collections.Generic;
using System.Text;

using Mosa.Runtime.CompilerFramework;
using Mosa.Runtime.CompilerFramework.Operands;
using CIL = Mosa.Runtime.CompilerFramework.CIL;
using IR = Mosa.Runtime.CompilerFramework.IR;
using System.Diagnostics;

namespace Mosa.Platforms.x86.Intrinsic
{
	/// <summary>
	/// 
	/// </summary>
	public sealed class Set : IIntrinsicMethod
	{

		#region Methods

		/// <summary>
		/// Replaces the instrinsic call site
		/// </summary>
		/// <param name="context">The context.</param>
		public void ReplaceIntrinsicCall(Context context)
		{
			Operand dest = context.Operand1;
			Operand value = context.Operand2;

			RegisterOperand edx = new RegisterOperand(dest.Type, GeneralPurposeRegister.EDX);
			RegisterOperand eax = new RegisterOperand(value.Type, GeneralPurposeRegister.EAX);

			context.SetInstruction(CPUx86.Instruction.MovInstruction, eax, value);
			context.AppendInstruction(CPUx86.Instruction.MovInstruction, dest, eax);
		}

		#endregion // Methods

	}
}<commit_msg>Implemented Intrinsic.Set<commit_after>﻿/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  <NAME> (rootnode) <<EMAIL>>
 */

using System;
using System.Collections.Generic;
using System.Text;

using Mosa.Runtime.CompilerFramework;
using Mosa.Runtime.CompilerFramework.Operands;
using CIL = Mosa.Runtime.CompilerFramework.CIL;
using IR = Mosa.Runtime.CompilerFramework.IR;
using System.Diagnostics;

namespace Mosa.Platforms.x86.Intrinsic
{
	/// <summary>
	/// 
	/// </summary>
	public sealed class Set : IIntrinsicMethod
	{

		#region Methods

		/// <summary>
		/// Replaces the instrinsic call site
		/// </summary>
		/// <param name="context">The context.</param>
		public void ReplaceIntrinsicCall(Context context)
		{
			Operand dest = context.Operand1;
			Operand value = context.Operand2;

			RegisterOperand edx = new RegisterOperand(dest.Type, GeneralPurposeRegister.EDX);
			RegisterOperand eax = new RegisterOperand(value.Type, GeneralPurposeRegister.EAX);
			MemoryOperand memory = new MemoryOperand(value.Type, GeneralPurposeRegister.EDX, new IntPtr(0));

			context.SetInstruction(CPUx86.Instruction.MovInstruction, edx, dest);
			context.SetInstruction(CPUx86.Instruction.MovInstruction, eax, value);
			context.AppendInstruction(CPUx86.Instruction.MovInstruction, memory, eax);
		}

		#endregion // Methods

	}
}
{'fraction_non_alphanumeric': 0.11668567084758646, 'fraction_numerical': 0.010262257696693273, 'mean_word_length': 4.253493013972056, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7541365', 'n_tokens_mistral': 885, 'n_tokens_neox': 816, 'n_words': 189}