mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
76d2f9a4db
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91996 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
596 B
LLVM
16 lines
596 B
LLVM
;RUN: llvm-as < %s | llc -march=pic16
|
|
|
|
@aa = global i16 55, align 1 ; <i16*> [#uses=1]
|
|
@bb = global i16 44, align 1 ; <i16*> [#uses=1]
|
|
@PORTD = external global i8 ; <i8*> [#uses=1]
|
|
|
|
define void @foo() nounwind {
|
|
entry:
|
|
%tmp = volatile load i16* @aa ; <i16> [#uses=1]
|
|
%tmp1 = volatile load i16* @bb ; <i16> [#uses=1]
|
|
%sub = sub i16 %tmp, %tmp1 ; <i16> [#uses=1]
|
|
%conv = trunc i16 %sub to i8 ; <i8> [#uses=1]
|
|
store i8 %conv, i8* @PORTD
|
|
ret void
|
|
}
|