mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 18:08:55 +03:00
Rename Arm to Aarch32, fix some of its code gen
As far as I can tell, Aarch32 only supports 32-bit registers, so its pointers should be 4 bytes and its F64 alignment should be 4 bytes as well (because it's emulated in software).
This commit is contained in:
parent
777625be21
commit
fb5f30e5ed
@ -1134,7 +1134,7 @@ fn arch_to_str(architecture: &Architecture) -> &'static str {
|
||||
Architecture::X86_64 => "x86_64",
|
||||
Architecture::X86_32 => "x86",
|
||||
Architecture::Aarch64 => "aarch64",
|
||||
Architecture::Arm => "arm",
|
||||
Architecture::Aarch32 => "arm",
|
||||
Architecture::Wasm32 => "wasm32",
|
||||
}
|
||||
}
|
||||
|
@ -60,11 +60,8 @@ impl FloatWidth {
|
||||
match self {
|
||||
F32 => 4,
|
||||
F64 | F128 => match target_info.architecture {
|
||||
Architecture::X86_64
|
||||
| Architecture::Aarch64
|
||||
| Architecture::Arm
|
||||
| Architecture::Wasm32 => 8,
|
||||
Architecture::X86_32 => 4,
|
||||
Architecture::X86_64 | Architecture::Aarch64 | Architecture::Wasm32 => 8,
|
||||
Architecture::X86_32 | Architecture::Aarch32 => 4,
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -129,7 +126,7 @@ impl IntWidth {
|
||||
U64 | I64 => match target_info.architecture {
|
||||
Architecture::X86_64
|
||||
| Architecture::Aarch64
|
||||
| Architecture::Arm
|
||||
| Architecture::Aarch32
|
||||
| Architecture::Wasm32 => 8,
|
||||
Architecture::X86_32 => 4,
|
||||
},
|
||||
|
@ -70,7 +70,7 @@ pub enum Architecture {
|
||||
X86_64,
|
||||
X86_32,
|
||||
Aarch64,
|
||||
Arm,
|
||||
Aarch32,
|
||||
Wasm32,
|
||||
}
|
||||
|
||||
@ -79,8 +79,8 @@ impl Architecture {
|
||||
use Architecture::*;
|
||||
|
||||
match self {
|
||||
X86_64 | Aarch64 | Arm => PtrWidth::Bytes8,
|
||||
X86_32 | Wasm32 => PtrWidth::Bytes4,
|
||||
X86_64 | Aarch64 => PtrWidth::Bytes8,
|
||||
X86_32 | Aarch32 | Wasm32 => PtrWidth::Bytes4,
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ impl From<target_lexicon::Architecture> for Architecture {
|
||||
target_lexicon::Architecture::X86_64 => Architecture::X86_64,
|
||||
target_lexicon::Architecture::X86_32(_) => Architecture::X86_32,
|
||||
target_lexicon::Architecture::Aarch64(_) => Architecture::Aarch64,
|
||||
target_lexicon::Architecture::Arm(_) => Architecture::Arm,
|
||||
target_lexicon::Architecture::Arm(_) => Architecture::Aarch32,
|
||||
target_lexicon::Architecture::Wasm32 => Architecture::Wasm32,
|
||||
_ => unreachable!("unsupported architecture"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user