public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7357c9
)
6502: optimise the top byte check to avoid a shift
author
Alan Cox
<alan@linux.intel.com>
Sun, 11 Feb 2018 21:31:00 +0000
(21:31 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Sun, 11 Feb 2018 21:31:00 +0000
(21:31 +0000)
Kernel/cpu-6502/cpu.h
patch
|
blob
|
history
diff --git
a/Kernel/cpu-6502/cpu.h
b/Kernel/cpu-6502/cpu.h
index
9c3ce28
..
aa10486
100644
(file)
--- a/
Kernel/cpu-6502/cpu.h
+++ b/
Kernel/cpu-6502/cpu.h
@@
-65,3
+65,7
@@
typedef union { /* this structure is endian dependent */
/* cc65 really wants register tags on struct pointers used repeatedly */
#define regptr register
+
+/* CC65 is bright enough to partly optimise this but not fully so do it
+ by hand */
+#define HIBYTE32(x) (((uint8_t *)&(x))[3])