-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #849 from andrew-johnson-4/prune-optimize-6
Prune optimize 6
- Loading branch information
Showing
20 changed files
with
26,475 additions
and
27,279 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,42 @@ | ||
|
||
macro ('declare-unop (op-alias op-code op-type op-rtype op-size return-size reg-type)) ( | ||
op-alias := λ: Blob(: l op-type+Constant). (: ( | ||
(:program( | ||
'\tmov\s$_s (:expression l) ',\s%_l (rax-of-size op-size) '\n_s | ||
op-code | ||
)) | ||
(:frame( (:frame l) )) | ||
(:unframe( (:unframe l) )) | ||
(:expression(rax-of-size return-size)) | ||
) op-rtype); | ||
op-alias := λ: Blob(: l op-type+LocalVariable). (: ( | ||
(:program( | ||
'\tmov\s_s (:expression l) '\[%RBP\],\s%_l (rax-of-size op-size) '\n_s | ||
op-code | ||
)) | ||
(:frame( (:frame l) )) | ||
(:unframe( (:unframe l) )) | ||
(:expression(rax-of-size return-size)) | ||
) op-rtype); | ||
op-alias := λ: Blob(: l op-type+GlobalVariable). (: ( | ||
(:program( | ||
'\tmov\s$_s (:expression l) ',\s%RAX\n_s | ||
'\tmov\s0\[%RAX\],\s%_l (rax-of-size op-size) '\n_s | ||
op-code | ||
)) | ||
(:frame( (:frame l) )) | ||
(:unframe( (:unframe l) )) | ||
(:expression(rax-of-size return-size)) | ||
) op-rtype); | ||
op-alias := λ: Blob(: l op-type+reg-type). (: ( | ||
(:program( | ||
(:program l) | ||
'\tmov\s%_s (:expression l) ',\s%_l (rax-of-size op-size) '\n_s | ||
op-code | ||
)) | ||
(:frame( (:frame l) )) | ||
(:unframe( (:unframe l) )) | ||
(:expression(rax-of-size return-size)) | ||
) op-rtype); | ||
); | ||
|
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 was deleted.
Oops, something went wrong.
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
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
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,11 @@ | ||
|
||
is-array := λ(: tt Type). (: ( | ||
(let r 0_u64) | ||
(match tt ( | ||
() | ||
( (TAnd( t1 t2 )) (set r (||( (is-array t1) (is-array t2) ))) ) | ||
( (TGround( 'Array_s _ )) (set r 1_u64) ) | ||
( _ () ) | ||
)) | ||
r | ||
) U64); |
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,11 @@ | ||
|
||
is-rc := λ(: tt Type). (: ( | ||
(let r 0_u64) | ||
(match tt ( | ||
() | ||
( (TAnd( t1 t2 )) (set r (||( (is-rc t1) (is-rc t2) ))) ) | ||
( (TGround( 'Rc_s _ )) (set r 1_u64) ) | ||
( _ () ) | ||
)) | ||
r | ||
) U64); |
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,11 @@ | ||
|
||
is-stack-variable := λ(: tt Type). (: ( | ||
(let r 0_u64) | ||
(match tt ( | ||
() | ||
( (TAnd( t1 t2 )) (set r (||( (is-stack-variable t1) (is-stack-variable t2) ))) ) | ||
( (TGround( 'StackVariable_s _ )) (set r 1_u64) ) | ||
( _ () ) | ||
)) | ||
r | ||
) U64); |
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 |
---|---|---|
@@ -1,2 +1,11 @@ | ||
|
||
is-vararg := λ(: tt Type). (: (non-zero(slot( tt '..._s ))) U64) | ||
is-vararg := λ(: tt Type). (: ( | ||
(let r 0_u64) | ||
(match tt ( | ||
() | ||
( (TAnd( t1 t2 )) (set r (||( (is-vararg t1) (is-vararg t2) ))) ) | ||
( (TGround( '..._s _ )) (set r 1_u64) ) | ||
( _ () ) | ||
)) | ||
r | ||
) U64); |
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