Skip to content

Commit cd1131a

Browse files
Merge pull request #83 from thejpster/check-asm
Check the assembly
2 parents f277c1e + 9a68806 commit cd1131a

File tree

226 files changed

+978
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+978
-62
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
rustup target add ${{ matrix.target }}
3939
- name: Build
4040
run: |
41-
cargo build --target ${{ matrix.target }} --features "serde, defmt"
41+
cargo build --target ${{ matrix.target }} --features "serde, defmt, check-asm"
4242
cargo build --target ${{ matrix.target }} --no-default-features
4343
4444
build-versatileab:
@@ -126,7 +126,7 @@ jobs:
126126
rustup component add rust-src --toolchain nightly
127127
- name: Build
128128
run: |
129-
cargo build --target ${{ matrix.target }} -Zbuild-std=core
129+
cargo build --target ${{ matrix.target }} -Zbuild-std=core --features "serde, defmt, check-asm"
130130
cargo build --target ${{ matrix.target }} -Zbuild-std=core --no-default-features
131131
132132
# Gather all the above build jobs together for the purposes of getting an overall pass-fail

aarch32-cpu/src/pmsav7.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl Mpu {
5656
return None;
5757
}
5858
register::Rgnr::write(register::Rgnr(idx as u32));
59-
let base = register::Irbar::read().0;
59+
let base = register::Irbar::read().0 as *mut u8;
6060
let rsr = register::Irsr::read();
6161
let racr = register::Iracr::read();
6262

@@ -85,7 +85,7 @@ impl Mpu {
8585
return None;
8686
}
8787
register::Rgnr::write(register::Rgnr(idx as u32));
88-
let base = register::Drbar::read().0;
88+
let base = register::Drbar::read().0 as *mut u8;
8989
let rsr = register::Drsr::read();
9090
let racr = register::Dracr::read();
9191

@@ -120,7 +120,7 @@ impl Mpu {
120120
if !region.size.is_aligned(region.base) {
121121
return Err(Error::UnalignedRegion(region.base));
122122
}
123-
register::Irbar::write(register::Irbar(region.base));
123+
register::Irbar::write(register::Irbar(region.base as u32));
124124
register::Irsr::write({
125125
let mut out = register::Irsr::new_with_raw_value(0);
126126
out.set_enabled(region.enabled);
@@ -145,7 +145,7 @@ impl Mpu {
145145
return Err(Error::UnalignedRegion(region.base));
146146
}
147147
register::Rgnr::write(register::Rgnr(idx as u32));
148-
register::Drbar::write(register::Drbar(region.base));
148+
register::Drbar::write(register::Drbar(region.base as u32));
149149
register::Drsr::write({
150150
let mut out = register::Drsr::new_with_raw_value(0);
151151
out.set_enabled(region.enabled);

aarch32-cpu/src/register/actlr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Actlr(pub u32);
10+
1011
impl SysReg for Actlr {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 1;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 0;
1516
const OP2: u32 = 1;
1617
}
18+
1719
impl crate::register::SysRegRead for Actlr {}
20+
1821
impl Actlr {
1922
#[inline]
2023
/// Reads ACTLR (*Auxiliary Control Register*)
2124
pub fn read() -> Actlr {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Actlr {}
30+
2631
impl Actlr {
2732
#[inline]
2833
/// Writes ACTLR (*Auxiliary Control Register*)

aarch32-cpu/src/register/actlr2.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Actlr2(pub u32);
10+
1011
impl SysReg for Actlr2 {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 1;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 0;
1516
const OP2: u32 = 3;
1617
}
18+
1719
impl crate::register::SysRegRead for Actlr2 {}
20+
1821
impl Actlr2 {
1922
#[inline]
2023
/// Reads ACTLR2 (*Auxiliary Control Register 2*)
2124
pub fn read() -> Actlr2 {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Actlr2 {}
30+
2631
impl Actlr2 {
2732
#[inline]
2833
/// Writes ACTLR2 (*Auxiliary Control Register 2*)

aarch32-cpu/src/register/adfsr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Adfsr(pub u32);
10+
1011
impl SysReg for Adfsr {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 5;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 1;
1516
const OP2: u32 = 0;
1617
}
18+
1719
impl crate::register::SysRegRead for Adfsr {}
20+
1821
impl Adfsr {
1922
#[inline]
2023
/// Reads ADFSR (*Auxiliary Data Fault Status Register*)
2124
pub fn read() -> Adfsr {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Adfsr {}
30+
2631
impl Adfsr {
2732
#[inline]
2833
/// Writes ADFSR (*Auxiliary Data Fault Status Register*)

aarch32-cpu/src/register/aidr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ use crate::register::{SysReg, SysRegRead};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Aidr(pub u32);
10+
1011
impl SysReg for Aidr {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 0;
1314
const OP1: u32 = 1;
1415
const CRM: u32 = 0;
1516
const OP2: u32 = 7;
1617
}
18+
1719
impl crate::register::SysRegRead for Aidr {}
20+
1821
impl Aidr {
1922
#[inline]
2023
/// Reads AIDR (*Auxiliary ID Register*)

aarch32-cpu/src/register/aifsr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Aifsr(pub u32);
10+
1011
impl SysReg for Aifsr {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 5;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 1;
1516
const OP2: u32 = 1;
1617
}
18+
1719
impl crate::register::SysRegRead for Aifsr {}
20+
1821
impl Aifsr {
1922
#[inline]
2023
/// Reads AIFSR (*Auxiliary Instruction Fault Status Register*)
2124
pub fn read() -> Aifsr {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Aifsr {}
30+
2631
impl Aifsr {
2732
#[inline]
2833
/// Writes AIFSR (*Auxiliary Instruction Fault Status Register*)

aarch32-cpu/src/register/amair0.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Amair0(pub u32);
10+
1011
impl SysReg for Amair0 {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 10;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 3;
1516
const OP2: u32 = 0;
1617
}
18+
1719
impl crate::register::SysRegRead for Amair0 {}
20+
1821
impl Amair0 {
1922
#[inline]
2023
/// Reads AMAIR0 (*Auxiliary Memory Attribute Indirection Register 0*)
2124
pub fn read() -> Amair0 {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Amair0 {}
30+
2631
impl Amair0 {
2732
#[inline]
2833
/// Writes AMAIR0 (*Auxiliary Memory Attribute Indirection Register 0*)

aarch32-cpu/src/register/amair1.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Amair1(pub u32);
10+
1011
impl SysReg for Amair1 {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 10;
1314
const OP1: u32 = 0;
1415
const CRM: u32 = 3;
1516
const OP2: u32 = 1;
1617
}
18+
1719
impl crate::register::SysRegRead for Amair1 {}
20+
1821
impl Amair1 {
1922
#[inline]
2023
/// Reads AMAIR1 (*Auxiliary Memory Attribute Indirection Register 1*)
2124
pub fn read() -> Amair1 {
2225
unsafe { Self(<Self as SysRegRead>::read_raw()) }
2326
}
2427
}
28+
2529
impl crate::register::SysRegWrite for Amair1 {}
30+
2631
impl Amair1 {
2732
#[inline]
2833
/// Writes AMAIR1 (*Auxiliary Memory Attribute Indirection Register 1*)

aarch32-cpu/src/register/armv8r/cntfrq.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
77
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99
pub struct Cntfrq(pub u32);
10+
1011
impl SysReg for Cntfrq {
1112
const CP: u32 = 15;
1213
const CRN: u32 = 14;

0 commit comments

Comments
 (0)