Search
lxdream.org :: lxdream/src/mmio.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mmio.h
changeset 975:007bf7eb944f
prev953:f4a156508ad1
next1067:d3c00ffccfcd
author nkeynes
date Wed Mar 04 23:12:21 2009 +0000 (15 years ago)
permissions -rw-r--r--
last change Move xltcache to xlat/ src directory
Commit new and improved x86 opcode file - cleaned up and added support for amd64 extended registers
file annotate diff log raw
1.1 --- a/src/mmio.h Tue Jan 13 11:56:28 2009 +0000
1.2 +++ b/src/mmio.h Wed Mar 04 23:12:21 2009 +0000
1.3 @@ -112,7 +112,7 @@
1.4 #undef MMIO_REGION_LIST_BEGIN
1.5 #undef MMIO_REGION
1.6 #undef MMIO_REGION_LIST_END
1.7 -#define MMIO_REGION_BEGIN(b,id,d) struct mmio_region mmio_region_##id = { #id, d, b, {mmio_region_##id##_read, mmio_region_##id##_write,mmio_region_##id##_read, mmio_region_##id##_write,mmio_region_##id##_read, mmio_region_##id##_write,NULL, NULL, unmapped_prefetch}, 0, 0, {
1.8 +#define MMIO_REGION_BEGIN(b,id,d) struct mmio_region mmio_region_##id = { #id, d, b, {mmio_region_##id##_read, mmio_region_##id##_write,mmio_region_##id##_read_word, mmio_region_##id##_write,mmio_region_##id##_read_byte, mmio_region_##id##_write,NULL, NULL, unmapped_prefetch, mmio_region_##id##_read_byte}, 0, 0, {
1.9 #define LONG_PORT( o,id,f,def,d ) { #id, d, 32, o, def, f },
1.10 #define WORD_PORT( o,id,f,def,d ) { #id, d, 16, o, def, f },
1.11 #define BYTE_PORT( o,id,f,def,d ) { #id, d, 8, o, def, f },
1.12 @@ -153,6 +153,7 @@
1.13 #define MMIO_REGION_DEFFNS( id ) \
1.14 MMIO_REGION_READ_DEFFN( id ) \
1.15 MMIO_REGION_WRITE_DEFFN( id )
1.16 +
1.17 #endif
1.18
1.19 #else
1.20 @@ -162,6 +163,8 @@
1.21 #define MMIO_REGION_BEGIN(b,id,d) \
1.22 extern struct mmio_region mmio_region_##id; \
1.23 int32_t FASTCALL mmio_region_##id##_read(uint32_t); \
1.24 +int32_t FASTCALL mmio_region_##id##_read_word(uint32_t); \
1.25 +int32_t FASTCALL mmio_region_##id##_read_byte(uint32_t); \
1.26 void FASTCALL mmio_region_##id##_write(uint32_t, uint32_t); \
1.27 enum mmio_region_##id##_port_t {
1.28 #define LONG_PORT( o,id,f,def,d ) id = o,
1.29 @@ -179,6 +182,10 @@
1.30 #define MMIO_REGION_READ_FN( id, reg ) \
1.31 int32_t FASTCALL mmio_region_##id##_read( uint32_t reg )
1.32
1.33 +#define MMIO_REGION_READ_DEFSUBFNS( id ) \
1.34 +int32_t FASTCALL mmio_region_##id##_read_word( uint32_t reg ) { return SIGNEXT16(mmio_region_##id##_read(reg)); } \
1.35 +int32_t FASTCALL mmio_region_##id##_read_byte( uint32_t reg ) { return SIGNEXT8(mmio_region_##id##_read(reg)); }
1.36 +
1.37
1.38 #endif
1.39
.