-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
7,435 additions
and
7,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
fn test (reg u64[2] t) -> reg u64[2] { | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] += 1; | ||
} | ||
return t; | ||
} | ||
|
||
export fn main () -> reg u64 { | ||
reg u64[2] t; | ||
reg u64 r; | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] = i; | ||
} | ||
t = test(t); | ||
t[0] += t[1]; | ||
r = t[0]; | ||
return r; | ||
} |
63 changes: 63 additions & 0 deletions
63
compiler/tests/success/subroutines/x86-64/arr_exp_finfo.jazz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
fn test1 (reg u64[2] t, reg ptr u64[2] p) -> reg ptr u64[2], reg u64[2] { | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] += 1; | ||
p[i] += 1; | ||
} | ||
|
||
return p, t; | ||
} | ||
|
||
fn test2 (reg u64[2] t, reg ptr u64[2] p) -> reg u64[2], reg ptr u64[2] { | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] += 1; | ||
p[i] += 1; | ||
} | ||
|
||
return t, p; | ||
} | ||
|
||
fn test3 (reg ptr u64[2] p, reg u64[2] t) -> reg ptr u64[2], reg u64[2] { | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] += 1; | ||
p[i] += 1; | ||
} | ||
|
||
return p, t; | ||
} | ||
|
||
fn test4 (reg ptr u64[2] p, reg u64[2] t) -> reg u64[2], reg ptr u64[2] { | ||
inline int i; | ||
for i = 0 to 2 { | ||
t[i] += 1; | ||
p[i] += 1; | ||
} | ||
|
||
return t, p; | ||
} | ||
|
||
|
||
|
||
export fn main () -> reg u64 { | ||
stack u64[2] s; | ||
reg u64[2] t; | ||
reg ptr u64[2] p; | ||
reg u64 r; | ||
inline int i; | ||
p = s; | ||
for i = 0 to 2 { | ||
t[i] = i; | ||
p[i] = i; | ||
} | ||
p,t = test1(t,p); | ||
t,p = test2(t,p); | ||
p,t = test3(p,t); | ||
t,p = test4(p,t); | ||
t[0] += t[1]; | ||
t[0] += p[0]; | ||
t[0] += p[1]; | ||
r = t[0]; | ||
return r; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.