Sha256: df6a1d36df974690afe744737c8454bb91e320460282c74e7baab8f44004c599

Contents?: true

Size: 1.38 KB

Versions: 80

Compression:

Stored size: 1.38 KB

Contents

<#@ template debug="true" hostSpecific="true" #>
<#@ output extension=".cs" #>
<#@ Assembly Name="System.Core" #>
<#@ Assembly Name="System.Windows.Forms" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #> 
<#@ import namespace="System.Text.RegularExpressions" #> 
// This file was auto generated from the distrom opcodes.h file
// on <#= DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.FFF") #>
<#
  var mnemonics = File.ReadAllText(Host.ResolvePath(@"..\..\..\include\mnemonics.h"));
  var instRe = new Regex("typedef enum {(.+)} _InstructionType;", RegexOptions.Singleline);
  var regRe = new Regex("typedef enum {(.+)} _RegisterType;", RegexOptions.Singleline);
  var m = instRe.Match(mnemonics);
  var insts = m.Groups[1].Value.Split(',').Select(x => new { 
    Name = x.Split('=')[0].Trim().Substring(2),
    Value = x.Split('=')[1].Trim(),
  }).ToArray();  
  m = regRe.Match(mnemonics, m.Index + m.Length);
  var regs = m.Groups[1].Value.Split(',').Select(x => x.Trim()).ToArray();
#>
namespace diStorm
{
	public enum Opcode : ushort {
		<# foreach (var i in insts) { #>
		<#= i.Name #> = <#= i.Value #>,<# } #>
	}

	public enum Register {
		<# foreach (var r in regs) { #>
		<#= r #>,<# } #>
	}
}

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
contrast-agent-7.6.1 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.6.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.5.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.4.1 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.4.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.3.2 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.3.1 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.3.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.2.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.1.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-7.0.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.15.3 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.15.2 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.15.1 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.15.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.14.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.13.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.12.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.11.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt
contrast-agent-6.10.0 funchook/distorm/examples/cs/distorm-net/Opcodes.tt