diff options
author | Dave Chapman <dave@dchapman.com> | 2006-03-15 22:39:14 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-03-15 22:39:14 +0000 |
commit | 318953334b6252d2c3bc583eb0320f04567c18ba (patch) | |
tree | c7465e2d15030e934ab4a6a88019a30489f7747f | |
parent | 211d827c0a29083d96e0432c6965d8f3d59a9884 (diff) | |
download | rockbox-318953334b6252d2c3bc583eb0320f04567c18ba.tar.gz rockbox-318953334b6252d2c3bc583eb0320f04567c18ba.zip |
Another optimisation from Fredrik Öhrn - put the Z80 registers and some lookup tables in IRAM. Gives a significant boost on Coldfire targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9053 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/pacbox/z80.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/apps/plugins/pacbox/z80.c b/apps/plugins/pacbox/z80.c index b489682b3a..dace7b1bed 100644 --- a/apps/plugins/pacbox/z80.c +++ b/apps/plugins/pacbox/z80.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "z80_internal.h" | 28 | #include "z80_internal.h" |
29 | 29 | ||
30 | // Table with parity, sign and zero flags precomputed for each byte value | 30 | // Table with parity, sign and zero flags precomputed for each byte value |
31 | unsigned char PSZ_[256] = { | 31 | unsigned char PSZ_[256] IDATA_ATTR = { |
32 | Zero|Parity, 0, 0, Parity, 0, Parity, Parity, 0, 0, Parity, Parity, 0, Parity, 0, 0, Parity, | 32 | Zero|Parity, 0, 0, Parity, 0, Parity, Parity, 0, 0, Parity, Parity, 0, Parity, 0, 0, Parity, |
33 | 0, Parity, Parity, 0, Parity, 0, 0, Parity, Parity, 0, 0, Parity, 0, Parity, Parity, 0, | 33 | 0, Parity, Parity, 0, Parity, 0, 0, Parity, Parity, 0, 0, Parity, 0, Parity, Parity, 0, |
34 | 0, Parity, Parity, 0, Parity, 0, 0, Parity, Parity, 0, 0, Parity, 0, Parity, Parity, 0, | 34 | 0, Parity, Parity, 0, Parity, 0, 0, Parity, Parity, 0, 0, Parity, 0, Parity, Parity, 0, |
@@ -76,33 +76,33 @@ void do_opcode_xy( OpcodeInfo * ); | |||
76 | /** */ | 76 | /** */ |
77 | unsigned do_opcode_xycb( unsigned xy ); | 77 | unsigned do_opcode_xycb( unsigned xy ); |
78 | 78 | ||
79 | unsigned iflags_; // Interrupt mode (bits 0 and 1) and flags | 79 | unsigned iflags_ IBSS_ATTR; // Interrupt mode (bits 0 and 1) and flags |
80 | unsigned cycles_; // Number of CPU cycles elapsed so far | 80 | unsigned cycles_ IBSS_ATTR; // Number of CPU cycles elapsed so far |
81 | 81 | ||
82 | 82 | ||
83 | // Registers | 83 | // Registers |
84 | unsigned char B; //@- B register | 84 | unsigned char B IBSS_ATTR; //@- B register |
85 | unsigned char C; //@- C register | 85 | unsigned char C IBSS_ATTR; //@- C register |
86 | unsigned char D; //@- D register | 86 | unsigned char D IBSS_ATTR; //@- D register |
87 | unsigned char E; //@- E register | 87 | unsigned char E IBSS_ATTR; //@- E register |
88 | unsigned char H; //@- H register | 88 | unsigned char H IBSS_ATTR; //@- H register |
89 | unsigned char L; //@- L register | 89 | unsigned char L IBSS_ATTR; //@- L register |
90 | unsigned char A; //@- A register (accumulator) | 90 | unsigned char A IBSS_ATTR; //@- A register (accumulator) |
91 | unsigned char F; //@- Flags register | 91 | unsigned char F IBSS_ATTR; //@- Flags register |
92 | unsigned char B1; //@- Alternate B register (B') | 92 | unsigned char B1 IBSS_ATTR; //@- Alternate B register (B') |
93 | unsigned char C1; //@- Alternate C register (C') | 93 | unsigned char C1 IBSS_ATTR; //@- Alternate C register (C') |
94 | unsigned char D1; //@- Alternate D register (D') | 94 | unsigned char D1 IBSS_ATTR; //@- Alternate D register (D') |
95 | unsigned char E1; //@- Alternate E register (E') | 95 | unsigned char E1 IBSS_ATTR; //@- Alternate E register (E') |
96 | unsigned char H1; //@- Alternate H register (H') | 96 | unsigned char H1 IBSS_ATTR; //@- Alternate H register (H') |
97 | unsigned char L1; //@- Alternate L register (L') | 97 | unsigned char L1 IBSS_ATTR; //@- Alternate L register (L') |
98 | unsigned char A1; //@- Alternate A register (A') | 98 | unsigned char A1 IBSS_ATTR; //@- Alternate A register (A') |
99 | unsigned char F1; //@- Alternate flags register (F') | 99 | unsigned char F1 IBSS_ATTR; //@- Alternate flags register (F') |
100 | unsigned IX; //@- Index register X | 100 | unsigned IX IBSS_ATTR; //@- Index register X |
101 | unsigned IY; //@- Index register Y | 101 | unsigned IY IBSS_ATTR; //@- Index register Y |
102 | unsigned PC; //@- Program counter | 102 | unsigned PC IBSS_ATTR; //@- Program counter |
103 | unsigned SP; //@- Stack pointer | 103 | unsigned SP IBSS_ATTR; //@- Stack pointer |
104 | unsigned char I; //@- Interrupt register | 104 | unsigned char I IBSS_ATTR; //@- Interrupt register |
105 | unsigned char R; //@- Refresh register | 105 | unsigned char R IBSS_ATTR; //@- Refresh register |
106 | 106 | ||
107 | 107 | ||
108 | /** Returns the 16 bit register BC. */ | 108 | /** Returns the 16 bit register BC. */ |