mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
d950941e13
Generate code for the Blackfin family of DSPs from Analog Devices: http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html We aim to be compatible with the exsisting GNU toolchain found at: http://blackfin.uclinux.org/gf/project/toolchain The back-end is experimental. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77897 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
819 B
LLVM
20 lines
819 B
LLVM
; RUN: llvm-as < %s | llc -march=bfin -verify-machineinstrs > %t
|
|
|
|
%IntList = type %struct.intlist*
|
|
%ReadFn = type i32 ()*
|
|
%YYSTYPE = type { %IntList }
|
|
%struct.intlist = type { i32, %IntList }
|
|
@yyval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
|
|
|
|
define i32 @yyparse() {
|
|
bb0:
|
|
%reg254 = load i16* null ; <i16> [#uses=1]
|
|
%reg254-idxcast = sext i16 %reg254 to i64 ; <i64> [#uses=1]
|
|
%reg254-idxcast-scale = mul i64 %reg254-idxcast, -1 ; <i64> [#uses=1]
|
|
%reg254-idxcast-scale-offset = add i64 %reg254-idxcast-scale, 1 ; <i64> [#uses=1]
|
|
%reg261.idx1 = getelementptr %YYSTYPE* null, i64 %reg254-idxcast-scale-offset, i32 0 ; <%IntList*> [#uses=1]
|
|
%reg261 = load %IntList* %reg261.idx1 ; <%IntList> [#uses=1]
|
|
store %IntList %reg261, %IntList* getelementptr (%YYSTYPE* @yyval, i64 0, i32 0)
|
|
unreachable
|
|
}
|