mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 16:56:39 +00:00
Emit direction operand in binary insns that stores in memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ae1ddeb2f
commit
bcfd12a234
@ -151,7 +151,7 @@ let mayStore = 1 in
|
|||||||
class BinOpWF<bits<6> OpCode, string OpcStr, SDNode OpNode>:
|
class BinOpWF<bits<6> OpCode, string OpcStr, SDNode OpNode>:
|
||||||
ByteFormat<OpCode, (outs),
|
ByteFormat<OpCode, (outs),
|
||||||
(ins GPR:$src, i8imm:$offset, i8mem:$ptrlo, i8imm:$ptrhi),
|
(ins GPR:$src, i8imm:$offset, i8mem:$ptrlo, i8imm:$ptrhi),
|
||||||
!strconcat(OpcStr, " $ptrlo + $offset"),
|
!strconcat(OpcStr, " $ptrlo + $offset, F"),
|
||||||
[(PIC16Store (OpNode GPR:$src, (PIC16Load diraddr:$ptrlo,
|
[(PIC16Store (OpNode GPR:$src, (PIC16Load diraddr:$ptrlo,
|
||||||
(i8 imm:$ptrhi),
|
(i8 imm:$ptrhi),
|
||||||
(i8 imm:$offset))),
|
(i8 imm:$offset))),
|
||||||
|
13
test/CodeGen/PIC16/result_direction.ll
Normal file
13
test/CodeGen/PIC16/result_direction.ll
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
; RUN: llvm-as < %s | llc -march=pic16 | FileCheck %s
|
||||||
|
|
||||||
|
@a = common global i16 0, align 1 ; <i16*> [#uses=2]
|
||||||
|
|
||||||
|
define void @foo() nounwind {
|
||||||
|
entry:
|
||||||
|
%tmp = load i16* @a ; <i16> [#uses=1]
|
||||||
|
%add = add nsw i16 %tmp, 1 ; <i16> [#uses=1]
|
||||||
|
store i16 %add, i16* @a
|
||||||
|
;CHECK: movlw 1
|
||||||
|
;CHECK: addwf @a + 0, F
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user