Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit f8dc8fe

Browse files
committed
Add Frame Pointer
1 parent fd66884 commit f8dc8fe

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/registers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ mod esr_el1;
2424
mod esr_el2;
2525
mod far_el1;
2626
mod far_el2;
27+
mod fp;
2728
mod hcr_el2;
2829
mod id_aa64mmfr0_el1;
2930
mod lr;
@@ -70,6 +71,7 @@ pub use esr_el1::ESR_EL1;
7071
pub use esr_el2::ESR_EL2;
7172
pub use far_el1::FAR_EL1;
7273
pub use far_el2::FAR_EL2;
74+
pub use fp::FP;
7375
pub use hcr_el2::HCR_EL2;
7476
pub use id_aa64mmfr0_el1::ID_AA64MMFR0_EL1;
7577
pub use lr::LR;

src/registers/fp.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Copyright (c) 2022 by the author(s)
4+
//
5+
// Author(s):
6+
// - Andre Richter <[email protected]>
7+
8+
//! The frame pointer register
9+
10+
use tock_registers::interfaces::{Readable, Writeable};
11+
12+
pub struct Reg;
13+
14+
impl Readable for Reg {
15+
type T = u64;
16+
type R = ();
17+
18+
read_raw!(u64, "x29", "x");
19+
}
20+
21+
impl Writeable for Reg {
22+
type T = u64;
23+
type R = ();
24+
25+
write_raw!(u64, "x29", "x");
26+
}
27+
28+
pub const FP: Reg = Reg {};

0 commit comments

Comments
 (0)