summaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorSanto Cariotti <dcariotti24@gmail.com>2020-06-09 21:38:28 +0200
committerSanto Cariotti <dcariotti24@gmail.com>2020-06-09 21:38:28 +0200
commitbd389beb9efda3c6ded2c4dbe2e25ce70b6bf615 (patch)
tree19dc088b78605eaa9cbf3ebce5d8d9d40a514011 /src/processor
parentaabc169cf496ae3e1d285ec163a248818c56cacb (diff)
fix: registers closed in a single array
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/registers.rs26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/processor/registers.rs b/src/processor/registers.rs
index fbebd13..a23cd92 100644
--- a/src/processor/registers.rs
+++ b/src/processor/registers.rs
@@ -17,18 +17,7 @@ impl CSPR {
}
pub struct Registers {
- pub r1: i32,
- r2: i32,
- r3: i32,
- r4: i32,
- r5: i32,
- r6: i32,
- r7: i32,
- r8: i32,
- r9: i32,
- r10: i32,
- r11: i32,
- r12: i32,
+ pub r : [i32; 12],
ip: i32,
sp: i32,
lr: i32,
@@ -39,18 +28,7 @@ pub struct Registers {
impl Registers {
pub fn new() -> Self {
Registers {
- r1: 0,
- r2: 0,
- r3: 0,
- r4: 0,
- r5: 0,
- r6: 0,
- r7: 0,
- r8: 0,
- r9: 0,
- r10: 0,
- r11: 0,
- r12: 0,
+ r: [0; 12],
ip: 0,
sp: 0,
lr: 0,