mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
implement STRB and STRH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8ed7f8cde
commit
c391d16b49
@ -184,6 +184,14 @@ def str : InstARM<(ops IntRegs:$src, memri:$addr),
|
||||
"str $src, $addr",
|
||||
[(store IntRegs:$src, iaddr:$addr)]>;
|
||||
|
||||
def STRB : InstARM<(ops IntRegs:$src, IntRegs:$addr),
|
||||
"strb $src, [$addr]",
|
||||
[(truncstorei8 IntRegs:$src, IntRegs:$addr)]>;
|
||||
|
||||
def STRH : InstARM<(ops IntRegs:$src, IntRegs:$addr),
|
||||
"strh $src, [$addr]",
|
||||
[(truncstorei16 IntRegs:$src, IntRegs:$addr)]>;
|
||||
|
||||
def MOV : InstARM<(ops IntRegs:$dst, op_addr_mode1:$src),
|
||||
"mov $dst, $src", [(set IntRegs:$dst, addr_mode1:$src)]>;
|
||||
|
||||
|
15
test/CodeGen/ARM/mem.ll
Normal file
15
test/CodeGen/ARM/mem.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: llvm-as < %s | llc -march=arm &&
|
||||
; RUN: llvm-as < %s | llc -march=arm | grep strb &&
|
||||
; RUN: llvm-as < %s | llc -march=arm | grep strh
|
||||
|
||||
void %f1() {
|
||||
entry:
|
||||
store ubyte 0, ubyte* null
|
||||
ret void
|
||||
}
|
||||
|
||||
void %f2() {
|
||||
entry:
|
||||
store short 0, short* null
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user