mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-24 18:38:50 +00:00
Make main do some simple work without requiring main arguments to be happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
634b352fa6
commit
1b3512ff97
10
test/fib.ll
10
test/fib.ll
@ -19,7 +19,7 @@ RecurseCase:
|
|||||||
ret ulong %result
|
ret ulong %result
|
||||||
end
|
end
|
||||||
|
|
||||||
ulong "main"(int %argc, sbyte ** %argv)
|
ulong "realmain"(int %argc, sbyte ** %argv)
|
||||||
begin
|
begin
|
||||||
seteq int %argc, 2 ; {bool}:0
|
seteq int %argc, 2 ; {bool}:0
|
||||||
br bool %0, label %HasArg, label %Continue
|
br bool %0, label %HasArg, label %Continue
|
||||||
@ -34,3 +34,11 @@ Continue:
|
|||||||
%F = call ulong(ulong) *%fib(ulong %N)
|
%F = call ulong(ulong) *%fib(ulong %N)
|
||||||
ret ulong %F
|
ret ulong %F
|
||||||
end
|
end
|
||||||
|
|
||||||
|
int "main"()
|
||||||
|
begin
|
||||||
|
%Result = call ulong %fib(ulong 10)
|
||||||
|
%Result = cast ulong %Result to int
|
||||||
|
ret int %Result
|
||||||
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user