support riscv64 target

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-07-09 17:57:58 +02:00
parent a4c4ad55dc
commit 6834751522
15 changed files with 96 additions and 16 deletions
+3
View File
@@ -12,6 +12,9 @@ description = "Shared constants of the revive compiler"
[lib]
doctest = false
[features]
riscv-64 = []
[dependencies]
anyhow = { workspace = true }
serde = { workspace = true, features = ["derive"] }
+3
View File
@@ -7,7 +7,10 @@ pub const BYTE_LENGTH_BYTE: usize = 1;
pub const BYTE_LENGTH_X32: usize = 4;
/// Native stack alignment size in bytes
#[cfg(not(feautre = "riscv-64"))]
pub const BYTE_LENGTH_STACK_ALIGN: usize = 4;
#[cfg(feautre = "riscv-64")]
pub const BYTE_LENGTH_STACK_ALIGN: usize = 8;
/// The x86_64 word byte-length.
pub const BYTE_LENGTH_X64: usize = 8;