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 redo previou...
details: https://anonhg.NetBSD.org/xsrc/rev/2d0cad002edd
branches: trunk
changeset: 10075:2d0cad002edd
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Jan 04 00:09:11 2019 +0000
description:
redo previous slightly: restore packed attribute.
diffstat:
external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 596789cf660b -r 2d0cad002edd external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c
--- a/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Thu Jan 03 23:24:49 2019 +0000
+++ b/external/mit/xf86-video-ati/dist/src/AtomBios/CD_Operations.c Fri Jan 04 00:09:11 2019 +0000
@@ -215,8 +215,10 @@
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[2]);
}
+/* from xorg-server 1.18 compiler.h */
+struct local__una_u32 { uint32_t x __attribute__((packed)); };
+
/* Avoid conflicts with older versions of compiler.h */
-
#define ldw_u xldw_u
#define ldl_u xldl_u
#define stl_u xstl_u
@@ -224,20 +226,21 @@
static __inline__ uint16_t ldw_u(uint16_t *p)
{
uint16_t ret;
- memmove(&ret, p, sizeof(ret));
+ memmove(&ret, p, sizeof(*p));
return ret;
}
static __inline__ uint32_t ldl_u(uint32_t *p)
{
uint32_t ret;
- memmove(&ret, p, sizeof(ret));
+ memmove(&ret, p, sizeof(*p));
return ret;
}
static __inline__ void stl_u(uint32_t val, uint32_t *p)
{
- memmove(p, &val, sizeof(*p));
+ struct local__una_u32 *ptr = (struct local__una_u32 *) p;
+ ptr->x = val;
}
UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
Home |
Main Index |
Thread Index |
Old Index