mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
27 lines
505 B
Plaintext
27 lines
505 B
Plaintext
|
; This testcase shoudl return with an exit code of 1.
|
||
|
;
|
||
|
; RUN: if as < %s | lli -force-interpreter=false
|
||
|
; RUN: then exit 1
|
||
|
; RUN: else exit 0
|
||
|
; RUN: fi
|
||
|
|
||
|
target endian = little
|
||
|
target pointersize = 32
|
||
|
|
||
|
%test = global long 0
|
||
|
implementation
|
||
|
|
||
|
|
||
|
internal long %test() {
|
||
|
%tmp.0 = load long* %test ; <long> [#uses=1]
|
||
|
%tmp.1 = add long %tmp.0, 1 ; <long> [#uses=1]
|
||
|
ret long %tmp.1
|
||
|
}
|
||
|
|
||
|
int %main() {
|
||
|
%L = call long %test()
|
||
|
%I = cast long %L to int
|
||
|
ret int %I
|
||
|
}
|
||
|
|