67bce1c3ed09ac2d75243e864b93677dd8075e10
[buildroot.git] /
1 From dc8d0688471695ec5a8db5fef93fbcfc064891d5 Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Mon, 2 Jun 2014 01:17:31 +0400
4 Subject: [PATCH] xtensa: add support for xtensa architecture
5
6 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
7 Reviewed-by: Adam Jackson <ajax@redhat.com>
8 Signed-off-by: Keith Packard <keithp@keithp.com>
9 ---
10 Backported from: dc8d0688471695ec5a8db5fef93fbcfc064891d5
11
12 hw/xfree86/common/compiler.h | 5 ++++-
13 hw/xfree86/os-support/linux/lnx_video.c | 3 ++-
14 include/servermd.h | 14 ++++++++++++++
15 3 files changed, 20 insertions(+), 2 deletions(-)
16
17 diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
18 index 0319de0..1bd8def 100644
19 --- a/hw/xfree86/common/compiler.h
20 +++ b/hw/xfree86/common/compiler.h
21 @@ -1352,7 +1352,10 @@ stl_u(unsigned long val, unsigned int *p)
22 #else /* ix86 */
23
24 #if !defined(__SUNPRO_C)
25 -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__)
26 +#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && \
27 + !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && \
28 + !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) && \
29 + !defined(__xtensa__)
30 #ifdef GCCUSESGAS
31
32 /*
33 diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
34 index 40765fc..652f963 100644
35 --- a/hw/xfree86/os-support/linux/lnx_video.c
36 +++ b/hw/xfree86/os-support/linux/lnx_video.c
37 @@ -60,7 +60,8 @@ static Bool ExtendedEnabled = FALSE;
38 !defined(__nds32__) && \
39 !defined(__arm__) && \
40 !defined(__aarch64__) && \
41 - !defined(__arc__)
42 + !defined(__arc__) && \
43 + !defined(__xtensa__)
44
45 /*
46 * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
47 diff --git a/include/servermd.h b/include/servermd.h
48 index 2d1ccb1..081123b 100644
49 --- a/include/servermd.h
50 +++ b/include/servermd.h
51 @@ -313,6 +313,20 @@ SOFTWARE.
52
53 #endif /* ARC */
54
55 +#ifdef __xtensa__
56 +
57 +#ifdef __XTENSA_EL__
58 +#define IMAGE_BYTE_ORDER LSBFirst
59 +#define BITMAP_BIT_ORDER LSBFirst
60 +#endif
61 +#ifdef __XTENSA_EB__
62 +#define IMAGE_BYTE_ORDER MSBFirst
63 +#define BITMAP_BIT_ORDER MSBFirst
64 +#endif
65 +#define GLYPHPADBYTES 4
66 +
67 +#endif /* __xtensa__ */
68 +
69 /* size of buffer to use with GetImage, measured in bytes. There's obviously
70 * a trade-off between the amount of heap used and the number of times the
71 * ddx routine has to be called.
72 --
73 1.7.7.6
74