]> granicus.if.org Git - llvm/commitdiff
[AVR] Use a more appropriate integer type for wide IN/OUT instructions
authorDylan McKay <dylanmckay34@gmail.com>
Fri, 9 Dec 2016 07:49:14 +0000 (07:49 +0000)
committerDylan McKay <dylanmckay34@gmail.com>
Fri, 9 Dec 2016 07:49:14 +0000 (07:49 +0000)
We could previously select an integer which would hit an assertion error
in pseudo expansion.

The new type will also generate the appropriate fixups if needed, which
wasn't done beforehand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289192 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AVR/AVRInstrInfo.td

index 56673020c0e8cfe0f67a773350bfb2c56ace8232..bc66379ab70841039aed78379c95392619e221be 100644 (file)
@@ -1502,7 +1502,7 @@ isReMaterializable = 1 in
                      [(set i8:$dst, (load ioaddr8:$src))]>;
 
   def INWRdA : Pseudo<(outs DREGS:$dst),
-                      (ins i16imm:$src),
+                      (ins imm_port6:$src),
                       "inw\t$dst, $src",
                       [(set i16:$dst, (load ioaddr16:$src))]>;
 }
@@ -1514,7 +1514,7 @@ def OUTARr : FIOARr<(outs),
                     [(store i8:$src, ioaddr8:$dst)]>;
 
 def OUTWARr : Pseudo<(outs),
-                     (ins i16imm:$dst, DREGS:$src),
+                     (ins imm_port6:$dst, DREGS:$src),
                      "outw\t$dst, $src",
                      [(store i16:$src, ioaddr16:$dst)]>;