mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
43c3db37f6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41100 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
500 B
LLVM
17 lines
500 B
LLVM
; RUN: llvm-as < %s | \
|
|
; RUN: llc -march=arm -o %t -f
|
|
; RUN: grep ldrb %t | count 4
|
|
; RUN: grep strb %t | count 4
|
|
|
|
|
|
%struct.p = type <{ i8, i32 }>
|
|
@t = global %struct.p <{ i8 1, i32 10 }> ; <%struct.p*> [#uses=1]
|
|
@u = weak global %struct.p zeroinitializer ; <%struct.p*> [#uses=1]
|
|
|
|
define i32 @main() {
|
|
entry:
|
|
%tmp3 = load i32* getelementptr (%struct.p* @t, i32 0, i32 1), align 1 ; <i32> [#uses=2]
|
|
store i32 %tmp3, i32* getelementptr (%struct.p* @u, i32 0, i32 1), align 1
|
|
ret i32 %tmp3
|
|
}
|