-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TESTS] adding tests for all math instrs (which are supported by the …
…x64 backend)
- Loading branch information
Showing
16 changed files
with
255 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define u32 @main() { | ||
entry: | ||
%1 = and u32 14, 71 | ||
ret u32 %1 | ||
} | ||
|
||
# EXIT_CODE=6 |
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,16 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 60 | ||
%1 = i32 47 | ||
|
||
%2 = and i32 %0, %1 | ||
|
||
ret i32 %2 | ||
} | ||
|
||
# EXIT_CODE=44 |
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,14 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 34 | ||
%1 = and i32 %0, 99 | ||
|
||
ret i32 %1 | ||
} | ||
|
||
# EXIT_CODE=34 |
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,12 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define u32 @main() { | ||
entry: | ||
%1 = mul u32 13, 10 | ||
ret u32 %1 | ||
} | ||
|
||
# EXIT_CODE=130 |
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,16 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 11 | ||
%1 = i32 14 | ||
|
||
%2 = mul i32 %0, %1 | ||
|
||
ret i32 %2 | ||
} | ||
|
||
# EXIT_CODE=154 |
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,14 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 4 | ||
%1 = mul i32 %0, 3 | ||
|
||
ret i32 %1 | ||
} | ||
|
||
# EXIT_CODE=12 |
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,12 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define u32 @main() { | ||
entry: | ||
%1 = or u32 56, 92 | ||
ret u32 %1 | ||
} | ||
|
||
# EXIT_CODE=124 |
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,16 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 51 | ||
%1 = i32 57 | ||
|
||
%2 = or i32 %0, %1 | ||
|
||
ret i32 %2 | ||
} | ||
|
||
# EXIT_CODE=59 |
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,14 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define i32 @main() { | ||
entry: | ||
%0 = i32 29 | ||
%1 = or i32 %0, 26 | ||
|
||
ret i32 %1 | ||
} | ||
|
||
# EXIT_CODE=31 |
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,12 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
define u32 @main() { | ||
entry: | ||
%1 = sub u32 47, 33 | ||
ret u32 %1 | ||
} | ||
|
||
# EXIT_CODE=14 |
Oops, something went wrong.