mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205090 91177308-0d34-0410-b5e6-96231b3b80d8
57 lines
1.8 KiB
LLVM
57 lines
1.8 KiB
LLVM
; RUN: llc < %s -mtriple=arm64-apple-ios
|
|
; rdar://11849816
|
|
|
|
@shlib_path_substitutions = external hidden unnamed_addr global i8**, align 8
|
|
|
|
declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readnone
|
|
|
|
declare noalias i8* @xmalloc(i64) optsize
|
|
|
|
declare i64 @strlen(i8* nocapture) nounwind readonly optsize
|
|
|
|
declare i8* @__strcpy_chk(i8*, i8*, i64) nounwind optsize
|
|
|
|
declare i8* @__strcat_chk(i8*, i8*, i64) nounwind optsize
|
|
|
|
declare noalias i8* @xstrdup(i8*) optsize
|
|
|
|
define i8* @dyld_fix_path(i8* %path) nounwind optsize ssp {
|
|
entry:
|
|
br i1 undef, label %if.end56, label %for.cond
|
|
|
|
for.cond: ; preds = %entry
|
|
br i1 undef, label %for.cond10, label %for.body
|
|
|
|
for.body: ; preds = %for.cond
|
|
unreachable
|
|
|
|
for.cond10: ; preds = %for.cond
|
|
br i1 undef, label %if.end56, label %for.body14
|
|
|
|
for.body14: ; preds = %for.cond10
|
|
%call22 = tail call i64 @strlen(i8* undef) nounwind optsize
|
|
%sext = shl i64 %call22, 32
|
|
%conv30 = ashr exact i64 %sext, 32
|
|
%add29 = sub i64 0, %conv30
|
|
%sub = add i64 %add29, 0
|
|
%add31 = shl i64 %sub, 32
|
|
%sext59 = add i64 %add31, 4294967296
|
|
%conv33 = ashr exact i64 %sext59, 32
|
|
%call34 = tail call noalias i8* @xmalloc(i64 %conv33) nounwind optsize
|
|
br i1 undef, label %cond.false45, label %cond.true43
|
|
|
|
cond.true43: ; preds = %for.body14
|
|
unreachable
|
|
|
|
cond.false45: ; preds = %for.body14
|
|
%add.ptr = getelementptr inbounds i8* %path, i64 %conv30
|
|
unreachable
|
|
|
|
if.end56: ; preds = %for.cond10, %entry
|
|
ret i8* null
|
|
}
|
|
|
|
declare i32 @strncmp(i8* nocapture, i8* nocapture, i64) nounwind readonly optsize
|
|
|
|
declare i8* @strcpy(i8*, i8* nocapture) nounwind
|