X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FCodeGenerator.rst;h=d54df0f6f4b242408be4ea7da114b08e6757fdaf;hb=0a230e0d985625a3909cb78fd867a3abaf434565;hp=b5d41809744f9d310003fbb15a28181da93829a4;hpb=2f89e8144b960468e4135f6d17cb6aac69197cbb;p=oota-llvm.git diff --git a/docs/CodeGenerator.rst b/docs/CodeGenerator.rst index b5d41809744..d54df0f6f4b 100644 --- a/docs/CodeGenerator.rst +++ b/docs/CodeGenerator.rst @@ -1038,6 +1038,24 @@ for your target. It has the following strengths: are used to manipulate the input immediate (in this case, take the high or low 16-bits of the immediate). +* When using the 'Pat' class to map a pattern to an instruction that has one + or more complex operands (like e.g. `X86 addressing mode`_), the pattern may + either specify the operand as a whole using a ``ComplexPattern``, or else it + may specify the components of the complex operand separately. The latter is + done e.g. for pre-increment instructions by the PowerPC back end: + + :: + + def STWU : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst), + "stwu $rS, $dst", LdStStoreUpd, []>, + RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">; + + def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff), + (STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>; + + Here, the pair of ``ptroff`` and ``ptrreg`` operands is matched onto the + complex operand ``dst`` of class ``memri`` in the ``STWU`` instruction. + * While the system does automate a lot, it still allows you to write custom C++ code to match special cases if there is something that is hard to express. @@ -1776,6 +1794,7 @@ Here is the table: :raw-html:`NVPTX` :raw-html:`PowerPC` :raw-html:`Sparc` +:raw-html:`SystemZ` :raw-html:`X86` :raw-html:`XCore` :raw-html:`` @@ -1790,8 +1809,9 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` -:raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1804,6 +1824,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` :raw-html:` ` :raw-html:`` @@ -1817,9 +1838,10 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` :raw-html:` ` -:raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1832,8 +1854,9 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` -:raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1846,8 +1869,9 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` -:raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1860,6 +1884,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` :raw-html:` ` :raw-html:`` @@ -1874,8 +1899,9 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:` ` -:raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1888,6 +1914,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`* ` :raw-html:` ` :raw-html:``