Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xf86-video-ati/dist/src/AtomBios put back com...



details:   https://anonhg.NetBSD.org/xsrc/rev/e64af9060b19
branches:  trunk
changeset: 10069:e64af9060b19
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 02 15:54:24 2019 +0000

description:
put back compatibility code for now; needed for sparc (from martin@)

diffstat:

 external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c |  24 +++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diffs (34 lines):

diff -r 26f8cd5571e0 -r e64af9060b19 external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c
--- a/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c     Wed Jan 02 02:58:48 2019 +0000
+++ b/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c     Wed Jan 02 15:54:24 2019 +0000
@@ -215,6 +215,30 @@
     pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[2]);
 }
 
+/* from xorg-server 1.18 compiler.h */
+struct __una_u64 { uint64_t x __attribute__((packed)); };
+struct __una_u32 { uint32_t x __attribute__((packed)); };
+
+static __inline__ uint16_t ldw_u(uint16_t *p)
+{
+       uint16_t ret;
+       memmove(&ret, p, sizeof(*p));
+       return ret;
+}
+
+static __inline__ uint32_t ldl_u(uint32_t *p)
+{
+       uint32_t ret;
+       memmove(&ret, p, sizeof(*p));
+       return ret;
+}
+
+static __inline__ void stl_u(uint32_t val, uint32_t *p)
+{
+       struct __una_u32 *ptr = (struct __una_u32 *) p;
+       ptr->x = val;
+}
+
 UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
 {
     // if ((pParserTempData->IndirectData & 0x7f)==INDIRECT_IO_MM) pParserTempData->IndirectData|=pParserTempData->CurrentPortID;



Home | Main Index | Thread Index | Old Index