+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ilasm.exe.sources: added EmiteByteInst.cs.
+
2006-06-07 Ankit Jain <jankit@novell.com>
* Report.cs (Report.FilePath): New, static property.
+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * EmiteByteInst.cs: added. Implements support
+ for the .emitbyte directive.
+
2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* SwitchInstr.cs (Emit): Switch from using strings
--- /dev/null
+//
+// Mono.ILASM.EmitByteIntr.cs
+//
+// Author(s):
+// Rodrigo Kumpera (rkumpera@novell.com)
+//
+// (C) 2007 Novell, Inc (http://www.novell.com)
+//
+
+
+using System;
+using System.Collections;
+
+namespace Mono.ILASM {
+
+ public class EmitByteIntr : IInstr {
+
+ private int value;
+
+ public EmitByteIntr (int value, Location loc)
+ : base (loc)
+ {
+ this.value = value;
+ }
+
+ public override void Emit (CodeGen code_gen, MethodDef meth,
+ PEAPI.CILInstructions cil)
+ {
+ cil.emitbyte ((byte)value);
+ }
+ }
+
+}
+
codegen/MethodPointerTypeRef.cs
codegen/GenericArguments.cs
codegen/GenericParameters.cs
+codegen/EmitByteInstr.cs
parser/ScannerAdapter.cs
scanner/ILReader.cs
scanner/ILTokenizingException.cs
+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ILParser.jay: Implement .emitbyte directive
+
2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* ILParser.jay: Create LabelInfo instances for switch labels,
;\r
\r
method_decl : D_EMITBYTE int32\r
+ {\r
+ codegen.CurrentMethodDef.AddInstr (new\r
+ EmitByteIntr ((int) $2, tokenizer.Location));\r
+ \r
+ }\r
| D_MAXSTACK int32\r
{\r
codegen.CurrentMethodDef.SetMaxStack ((int) $2);\r
+2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * test-emitbyte.il: new test for .emitbyte directive
+
2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
* test-method-pointer-in-signature.il: New. Test for overloads
--- /dev/null
+/*
+This test try to use .emitbyte to generate the return value,
+the program should return 1 on sucess
+*/
+.assembly extern mscorlib
+{
+ .ver 2:0:0:0
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
+}
+.assembly 'test-emitbyte'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module ld_type.exe
+
+.class public auto ansi beforefieldinit Driver
+ extends [mscorlib]System.Object
+{
+
+ .method public static int32 Main ()
+ {
+ .entrypoint
+ .maxstack 2
+ .locals init (int32 bla)
+ nop
+ .emitbyte 0x17 //equivalent to the ldc.i4.1 mnemonic
+ ret
+
+ }
+}
+
+