Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
b8ed223b
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b8ed223b
编写于
10月 30, 2003
作者:
B
bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
big endian fixes
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@437
c046a42c-6fe2-441c-8c8c-71466251a162
上级
c970a162
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
19 deletion
+15
-19
hw/vga.c
hw/vga.c
+15
-19
未找到文件。
hw/vga.c
浏览文件 @
b8ed223b
...
...
@@ -141,12 +141,24 @@ static const uint8_t gr_mask[16] = {
(((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
(((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
#ifdef WORD_BIGENDIAN
#ifdef WORD
S
_BIGENDIAN
#define PAT(x) cbswap_32(x)
#else
#define PAT(x) (x)
#endif
#ifdef WORDS_BIGENDIAN
#define BIG 1
#else
#define BIG 0
#endif
#ifdef WORDS_BIGENDIAN
#define GET_PLANE(data, p) (((data) >> (24 - (p) * 8)) & 0xff)
#else
#define GET_PLANE(data, p) (((data) >> ((p) * 8)) & 0xff)
#endif
static
const
uint32_t
mask16
[
16
]
=
{
PAT
(
0x00000000
),
PAT
(
0x000000ff
),
...
...
@@ -168,7 +180,7 @@ static const uint32_t mask16[16] = {
#undef PAT
#ifdef WORD_BIGENDIAN
#ifdef WORD
S
_BIGENDIAN
#define PAT(x) (x)
#else
#define PAT(x) cbswap_32(x)
...
...
@@ -465,11 +477,7 @@ static uint32_t vga_mem_readb(uint32_t addr)
if
(
!
(
s
->
gr
[
5
]
&
0x08
))
{
/* read mode 0 */
plane
=
s
->
gr
[
4
];
#ifdef WORD_BIGENDIAN
ret
=
(
s
->
latch
>>
(
24
-
(
plane
*
8
)))
&
0xff
;
#else
ret
=
(
s
->
latch
>>
(
plane
*
8
))
&
0xff
;
#endif
ret
=
GET_PLANE
(
s
->
latch
,
plane
);
}
else
{
/* read mode 1 */
ret
=
(
s
->
latch
^
mask16
[
s
->
gr
[
2
]])
&
mask16
[
s
->
gr
[
7
]];
...
...
@@ -641,18 +649,6 @@ void vga_mem_writel(uint32_t addr, uint32_t val)
vga_mem_writeb
(
addr
+
3
,
(
val
>>
24
)
&
0xff
);
}
#ifdef WORD_BIGENDIAN
#define BIG 1
#else
#define BIG 0
#endif
#ifdef WORDS_BIGENDIAN
#define GET_PLANE(data, p) (((data) >> (24 - (p) * 8)) & 0xff)
#else
#define GET_PLANE(data, p) (((data) >> ((p) * 8)) & 0xff)
#endif
typedef
void
vga_draw_glyph8_func
(
uint8_t
*
d
,
int
linesize
,
const
uint8_t
*
font_ptr
,
int
h
,
uint32_t
fgcol
,
uint32_t
bgcol
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录