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:
Rafael Espindola 2006-10-23 20:34:27 +00:00
parent d8ed7f8cde
commit c391d16b49
2 changed files with 23 additions and 0 deletions

View File

@ -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
View 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
}