public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e982b13
)
cpu-z80: add ntohl
author
Alan Cox
<alan@linux.intel.com>
Wed, 13 Jan 2016 18:39:55 +0000
(18:39 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 13 Jan 2016 18:39:55 +0000
(18:39 +0000)
Kernel/cpu-z80/cpu.h
patch
|
blob
|
history
diff --git
a/Kernel/cpu-z80/cpu.h
b/Kernel/cpu-z80/cpu.h
index
9e5fe12
..
6c18da1
100644
(file)
--- a/
Kernel/cpu-z80/cpu.h
+++ b/
Kernel/cpu-z80/cpu.h
@@
-82,3
+82,5
@@
typedef union { /* this structure is endian dependent */
#define COMMON_MEMORY static void COMMONSEG(void) __naked { __asm .area _COMMONMEM __endasm; }
#define ntohs(x) ((((x) & 0xFF) << 8) | (((x) & 0xFF00) >> 8))
+#define ntohl(x) ((((x) & 0xFF) << 24) | (((x) & 0xFF00) << 8) | \
+ (((x) & 0xFF0000) >> 8) | (((x >> 24) & 0xFF)))