[sdb] Add ability to buffer reply packets in the wire protocol when running on high...
[mono-project.git] / mono / cil / make-opcode-def.xsl
blobea4ab48958aeeb5d84e4ced219ed4096318afba7
1 <?xml version="1.0" encoding="iso-8859-1"?>
4 <!--
5 | make-opcode-def.xsl: Translates opcodes from the CIL-opcodes.xml into
6 | a spec compliant opcodes.def file
7 | Converted to XSLT from make-opcodes-def.pl
9 | See: Common Language Infrastructure (CLI) Part 5: Annexes
11 | Author: Sergey Chaban
13 | $Id$
14 -->
18 <xsl:stylesheet version="1.0"
19 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
23 <xsl:output method="text"/>
26 <xsl:template match="/">
27 <xsl:apply-templates/>
28 <xsl:call-template name="print-trailer"/>
29 </xsl:template>
31 <xsl:template name="to-upper">
32 <xsl:param name="string"/>
33 <xsl:value-of select="translate($string,
34 'abcdefghijklmnopqrstuvwxyz.-',
35 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>
36 </xsl:template>
39 <xsl:template name="get-flow">
40 <xsl:param name="flow" select="@flow"/>
41 <xsl:choose>
42 <xsl:when
43 test="contains('next call return branch meta cond-branch',$flow)">
44 <xsl:call-template name="to-upper">
45 <xsl:with-param name="string" select="$flow"/>
46 </xsl:call-template>
47 </xsl:when>
48 <xsl:otherwise><xsl:value-of select="'ERROR'"/></xsl:otherwise>
49 </xsl:choose>
50 </xsl:template>
53 <xsl:template match="opdesc/opcode">
54 <xsl:variable name="uname">
55 <xsl:call-template name="to-upper">
56 <xsl:with-param name="string" select="@name"/>
57 </xsl:call-template>
58 </xsl:variable>
59 <xsl:variable name="o1">
60 <xsl:call-template name="to-upper">
61 <xsl:with-param name="string" select="@o1"/>
62 </xsl:call-template>
63 </xsl:variable>
64 <xsl:variable name="f">
65 <xsl:call-template name="get-flow"/>
66 </xsl:variable>
67 <xsl:variable name="count"
68 select="number(not(contains($o1,'FF')))+1"/>OPDEF(CEE_<xsl:value-of
69 select="concat($uname,', &#x22;',@name,'&#x22;, ',
70 @input,', ',@output,', ',@args,', X, ',
71 $count,', ',@o1,', ',@o2,', ',$f
72 )"/>)
73 </xsl:template>
76 <xsl:template name="print-trailer">
77 #ifndef OPALIAS
78 #define _MONO_CIL_OPALIAS_DEFINED_
79 #define OPALIAS(a,s,r)
80 #endif
82 OPALIAS(CEE_BRNULL, "brnull", CEE_BRFALSE)
83 OPALIAS(CEE_BRNULL_S, "brnull.s", CEE_BRFALSE_S)
84 OPALIAS(CEE_BRZERO, "brzero", CEE_BRFALSE)
85 OPALIAS(CEE_BRZERO_S, "brzero.s", CEE_BRFALSE_S)
86 OPALIAS(CEE_BRINST, "brinst", CEE_BRTRUE)
87 OPALIAS(CEE_BRINST_S, "brinst.s", CEE_BRTRUE_S)
88 OPALIAS(CEE_LDIND_U8, "ldind.u8", CEE_LDIND_I8)
89 OPALIAS(CEE_LDELEM_U8, "ldelem.u8", CEE_LDELEM_I8)
90 OPALIAS(CEE_LDX_I4_MIX, "ldc.i4.M1", CEE_LDC_I4_M1)
91 OPALIAS(CEE_ENDFAULT, "endfault", CEE_ENDFINALLY)
93 #ifdef _MONO_CIL_OPALIAS_DEFINED_
94 #undef OPALIAS
95 #undef _MONO_CIL_OPALIAS_DEFINED_
96 #endif
97 </xsl:template>
100 </xsl:stylesheet>