This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
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
12 changed files
with
354 additions
and
230 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 |
---|---|---|
@@ -1,17 +1,9 @@ | ||
// https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models | ||
#[allow(non_camel_case_types)] | ||
pub(crate) type SIZE_T = u64; | ||
#[allow(dead_code)] | ||
pub(crate) const SIZE_MAX: SIZE_T = SIZE_T::max_value(); | ||
|
||
pub(crate) const FLOAT_SIZE: u16 = 4; | ||
pub(crate) const DOUBLE_SIZE: u16 = 8; | ||
|
||
pub(crate) const LONG_SIZE: u16 = 8; | ||
pub(crate) const INT_SIZE: u16 = 4; | ||
pub(crate) const SHORT_SIZE: u16 = 2; | ||
pub(crate) const BOOL_SIZE: u16 = 1; | ||
|
||
pub(crate) const PTR_SIZE: u16 = 8; | ||
|
||
pub(crate) const CHAR_BIT: u16 = 8; // number of bits in a byte | ||
use super::Archictecture; | ||
|
||
struct x86_64; | ||
impl Archictecture for x86_64 { | ||
// https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models | ||
#[allow(non_camel_case_types)] | ||
type SIZE_T = u64; | ||
const SIZE_MAX: u64 = u64::max_value(); | ||
} |
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.