cortex_a/registers/
sp.rs

1// SPDX-License-Identifier: Apache-2.0 OR MIT
2//
3// Copyright (c) 2018-2022 by the author(s)
4//
5// Author(s):
6//   - Andre Richter <andre.o.richter@gmail.com>
7
8//! The stack pointer
9
10use tock_registers::interfaces::{Readable, Writeable};
11
12pub struct Reg;
13
14impl Readable for Reg {
15    type T = u64;
16    type R = ();
17
18    read_raw!(u64, "sp", "x");
19}
20
21impl Writeable for Reg {
22    type T = u64;
23    type R = ();
24
25    write_raw!(u64, "sp", "x");
26}
27
28pub const SP: Reg = Reg {};