Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Singlepass #2706

Merged
merged 46 commits into from
Dec 9, 2021
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
235b309
feat(compiler) Created abstraction for Reg and Location
ptitSeb Nov 3, 2021
9710ab8
fixed lint
ptitSeb Nov 3, 2021
17ccce9
Move Size enum to common_decl
ptitSeb Nov 10, 2021
45261a7
Abstraction for CombinedRegister
ptitSeb Nov 12, 2021
633896e
improve(compiler) Abstracted Machine on SinglePass (still need more a…
ptitSeb Nov 12, 2021
6c9be49
improvement(compiler) start to make codegen independant from arch (WIP)
ptitSeb Nov 17, 2021
443d16a
improvement(compiler) More work on codegen abstraction (atomic cmpxchg)
ptitSeb Nov 18, 2021
ace5d51
improvement(compiler) More work on codegen abstraction (atomic xchg)
ptitSeb Nov 18, 2021
6a33200
improvement(compiler) abstraction of emit_memory_op
ptitSeb Nov 23, 2021
36f947c
improvement(compiler) abstraction of lock + logic in codegen
ptitSeb Nov 24, 2021
3736eea
improvement(compiler) abstraction of lock add/sub in codegen
ptitSeb Nov 24, 2021
5b64a39
improvement(compiler) abstraction of atomic store (and a bunch of rel…
ptitSeb Nov 25, 2021
0c0d437
improvement(compiler) abstraction of relaxed move with zero or sign e…
ptitSeb Nov 26, 2021
5ae9c0f
improvement(compiler) abstraction of canonicalization and Operator::End
ptitSeb Nov 26, 2021
052351b
improvement(compiler) abstraction of Operator Return, Br, BrIf and Br…
ptitSeb Nov 26, 2021
9d751a7
improvement(compiler) abstraction of Operator CallIndirect
ptitSeb Nov 26, 2021
2b99188
improvement(compiler) abstraction of Operator Call
ptitSeb Nov 29, 2021
e84ba7a
improvement(compiler) abstraction of Operator F64Convert*
ptitSeb Nov 29, 2021
8b9535b
improvement(compiler) abstraction of Operator F32Convert*
ptitSeb Nov 29, 2021
232a9c0
improvement(compiler) abstraction of Operator I32Convert* and I64Conv…
ptitSeb Nov 29, 2021
a60dda9
improvement(compiler) abstraction of more F32/F64 coversion and opera…
ptitSeb Nov 30, 2021
cf3eea1
improvement(compiler) abstraction of more F32/F64 comparaisons
ptitSeb Nov 30, 2021
c247bf3
improvement(compiler) abstraction of F32 min/max operators
ptitSeb Dec 1, 2021
e430851
improvement(compiler) abstraction of F64/F32 add/sub/mul/div operators
ptitSeb Dec 1, 2021
f1244ac
improvement(compiler) abstraction of remaining i32 Operators
ptitSeb Dec 1, 2021
dccc6bf
improvement(compiler) abstraction of remaining i64 Operators
ptitSeb Dec 1, 2021
d49bc4d
improvement(compiler) abstraction of native calls
ptitSeb Dec 2, 2021
5660c09
improvement(compiler) abstraction of logic and math atomic operators
ptitSeb Dec 3, 2021
3c2e0ea
improvement(compiler) fix merge issues
ptitSeb Dec 3, 2021
b100880
improvement(compiler) fix test for machine_x86
ptitSeb Dec 3, 2021
d39e765
improvement(compiler) refactored atomic access again
ptitSeb Dec 3, 2021
6817a2d
improvement(compiler) refactored atomic exchange again
ptitSeb Dec 3, 2021
19691f6
improvement(compiler) refactored atomic cmpxchg again
ptitSeb Dec 3, 2021
5164cb9
improvement(compiler) refactored non-atomic load and store Operator
ptitSeb Dec 3, 2021
049a1f7
improvement(compiler) Fixed some of the later refactoring of memory_op
ptitSeb Dec 3, 2021
5ed8fbf
Fixed linting
ptitSeb Dec 3, 2021
517f81b
improvement(compiler) More x86_64 speicific code removed from CodeGen
ptitSeb Dec 6, 2021
7771fab
improvement(compiler) Remove CombinedRegister from Machine
ptitSeb Dec 6, 2021
b315ed5
Fixed linting
ptitSeb Dec 6, 2021
ab931de
improvement(compiler) Remove last GPR:: direct access in codegen
ptitSeb Dec 7, 2021
7dea877
improvement(compiler) Remove CombineRegister from CodeGen
ptitSeb Dec 7, 2021
3e52f77
improvement(compiler) CodeGen now completly abstracted, using Machine…
ptitSeb Dec 8, 2021
6fd9d13
improvement(compiler) renammed codeGen_x64 to CodeGen, now that it's …
ptitSeb Dec 8, 2021
e03fe0d
improvement(compiler) disabled test_release_locations_keep_state_nopa…
ptitSeb Dec 8, 2021
d29c1c4
improvement(compiler) Rename Emitter trait to EmitterX64 to avoid nam…
ptitSeb Dec 9, 2021
1bb284a
improvement(compiler) Removed commented test
ptitSeb Dec 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move Size enum to common_decl
  • Loading branch information
ptitSeb committed Dec 3, 2021
commit 17ccce9da5243ea9d53796ab01cf6ea54afc0865
8 changes: 8 additions & 0 deletions lib/compiler-singlepass/src/common_decl.rs
Original file line number Diff line number Diff line change
@@ -106,6 +106,14 @@ pub struct FunctionStateMap {
pub trappable_offsets: BTreeMap<usize, OffsetInfo>, /* suspend_offset -> info */
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub enum Size {
S8,
S16,
S32,
S64,
}

/// A kind of suspend offset.
#[derive(Clone, Copy, Debug)]
pub enum SuspendOffset {
9 changes: 1 addition & 8 deletions lib/compiler-singlepass/src/emitter_x64.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::common_decl::Size;
use crate::location::Location as AbstractLocation;
pub use crate::location::Multiplier;
pub use crate::x64_decl::{GPR, XMM};
@@ -53,14 +54,6 @@ pub enum Condition {
Carry,
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub enum Size {
S8,
S16,
S32,
S64,
}

#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[allow(dead_code)]
pub enum XMMOrMemory {