Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
65a650c2
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看板
提交
65a650c2
编写于
5月 04, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix compiler warnings in nwfpe code.
Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
6bb72b18
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
86 deletion
+47
-86
linux-user/arm/nwfpe/fpa11.c
linux-user/arm/nwfpe/fpa11.c
+0
-5
linux-user/arm/nwfpe/fpa11.h
linux-user/arm/nwfpe/fpa11.h
+9
-0
linux-user/arm/nwfpe/fpa11_cpdo.c
linux-user/arm/nwfpe/fpa11_cpdo.c
+0
-4
linux-user/arm/nwfpe/fpa11_cpdt.c
linux-user/arm/nwfpe/fpa11_cpdt.c
+38
-42
linux-user/arm/nwfpe/fpopcode.c
linux-user/arm/nwfpe/fpopcode.c
+0
-35
未找到文件。
linux-user/arm/nwfpe/fpa11.c
浏览文件 @
65a650c2
...
...
@@ -30,11 +30,6 @@
#include <stdio.h>
/* forward declarations */
unsigned
int
EmulateCPDO
(
const
unsigned
int
);
unsigned
int
EmulateCPDT
(
const
unsigned
int
);
unsigned
int
EmulateCPRT
(
const
unsigned
int
);
FPA11
*
qemufpa
=
0
;
CPUARMState
*
user_registers
;
...
...
linux-user/arm/nwfpe/fpa11.h
浏览文件 @
65a650c2
...
...
@@ -116,6 +116,15 @@ static inline void writeConditionCodes(unsigned int x)
unsigned
int
EmulateAll
(
unsigned
int
opcode
,
FPA11
*
qfpa
,
CPUARMState
*
qregs
);
unsigned
int
EmulateCPDO
(
const
unsigned
int
);
unsigned
int
EmulateCPDT
(
const
unsigned
int
);
unsigned
int
EmulateCPRT
(
const
unsigned
int
);
unsigned
int
SingleCPDO
(
const
unsigned
int
opcode
);
unsigned
int
DoubleCPDO
(
const
unsigned
int
opcode
);
unsigned
int
ExtendedCPDO
(
const
unsigned
int
opcode
);
/* included only for get_user/put_user macros */
#include "qemu.h"
...
...
linux-user/arm/nwfpe/fpa11_cpdo.c
浏览文件 @
65a650c2
...
...
@@ -22,10 +22,6 @@
#include "fpa11.h"
#include "fpopcode.h"
unsigned
int
SingleCPDO
(
const
unsigned
int
opcode
);
unsigned
int
DoubleCPDO
(
const
unsigned
int
opcode
);
unsigned
int
ExtendedCPDO
(
const
unsigned
int
opcode
);
unsigned
int
EmulateCPDO
(
const
unsigned
int
opcode
)
{
FPA11
*
fpa11
=
GET_FPA11
();
...
...
linux-user/arm/nwfpe/fpa11_cpdt.c
浏览文件 @
65a650c2
...
...
@@ -29,9 +29,8 @@
//#include <asm/uaccess.h>
static
inline
void
loadSingle
(
const
unsigned
int
Fn
,
const
unsigned
int
*
pMem
)
void
loadSingle
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
fpa11
->
fType
[
Fn
]
=
typeSingle
;
/* FIXME - handle failure of get_user() */
...
...
@@ -39,9 +38,8 @@ void loadSingle(const unsigned int Fn,const unsigned int *pMem)
}
static
inline
void
loadDouble
(
const
unsigned
int
Fn
,
const
unsigned
int
*
pMem
)
void
loadDouble
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
unsigned
int
*
p
;
p
=
(
unsigned
int
*
)
&
fpa11
->
fpreg
[
Fn
].
fDouble
;
...
...
@@ -58,9 +56,8 @@ void loadDouble(const unsigned int Fn,const unsigned int *pMem)
}
static
inline
void
loadExtended
(
const
unsigned
int
Fn
,
const
unsigned
int
*
pMem
)
void
loadExtended
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
unsigned
int
*
p
;
p
=
(
unsigned
int
*
)
&
fpa11
->
fpreg
[
Fn
].
fExtended
;
...
...
@@ -72,9 +69,8 @@ void loadExtended(const unsigned int Fn,const unsigned int *pMem)
}
static
inline
void
loadMultiple
(
const
unsigned
int
Fn
,
const
unsigned
int
*
pMem
)
void
loadMultiple
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
register
unsigned
int
*
p
;
unsigned
long
x
;
...
...
@@ -108,9 +104,8 @@ void loadMultiple(const unsigned int Fn,const unsigned int *pMem)
}
static
inline
void
storeSingle
(
const
unsigned
int
Fn
,
unsigned
int
*
pMem
)
void
storeSingle
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
float32
val
;
register
unsigned
int
*
p
=
(
unsigned
int
*
)
&
val
;
...
...
@@ -133,9 +128,8 @@ void storeSingle(const unsigned int Fn,unsigned int *pMem)
}
static
inline
void
storeDouble
(
const
unsigned
int
Fn
,
unsigned
int
*
pMem
)
void
storeDouble
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
float64
val
;
register
unsigned
int
*
p
=
(
unsigned
int
*
)
&
val
;
...
...
@@ -163,9 +157,8 @@ void storeDouble(const unsigned int Fn,unsigned int *pMem)
}
static
inline
void
storeExtended
(
const
unsigned
int
Fn
,
unsigned
int
*
pMem
)
void
storeExtended
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
floatx80
val
;
register
unsigned
int
*
p
=
(
unsigned
int
*
)
&
val
;
...
...
@@ -190,9 +183,8 @@ void storeExtended(const unsigned int Fn,unsigned int *pMem)
}
static
inline
void
storeMultiple
(
const
unsigned
int
Fn
,
unsigned
int
*
pMem
)
void
storeMultiple
(
const
unsigned
int
Fn
,
target_ulong
addr
)
{
target_ulong
addr
=
(
target_ulong
)(
long
)
pMem
;
FPA11
*
fpa11
=
GET_FPA11
();
register
unsigned
int
nType
,
*
p
;
...
...
@@ -220,25 +212,26 @@ void storeMultiple(const unsigned int Fn,unsigned int *pMem)
}
}
unsigned
int
PerformLDF
(
const
unsigned
int
opcode
)
static
unsigned
int
PerformLDF
(
const
unsigned
int
opcode
)
{
unsigned
int
*
pBase
,
*
pAddress
,
*
pFinal
,
nRc
=
1
,
target_ulong
pBase
,
pAddress
,
pFinal
;
unsigned
int
nRc
=
1
,
write_back
=
WRITE_BACK
(
opcode
);
//printk("PerformLDF(0x%08x), Fd = 0x%08x\n",opcode,getFd(opcode));
pBase
=
(
unsigned
int
*
)
readRegister
(
getRn
(
opcode
));
pBase
=
readRegister
(
getRn
(
opcode
));
if
(
REG_PC
==
getRn
(
opcode
))
{
pBase
+=
2
;
pBase
+=
8
;
write_back
=
0
;
}
pFinal
=
pBase
;
if
(
BIT_UP_SET
(
opcode
))
pFinal
+=
getOffset
(
opcode
);
pFinal
+=
getOffset
(
opcode
)
*
4
;
else
pFinal
-=
getOffset
(
opcode
);
pFinal
-=
getOffset
(
opcode
)
*
4
;
if
(
PREINDEXED
(
opcode
))
pAddress
=
pFinal
;
else
pAddress
=
pBase
;
...
...
@@ -254,26 +247,27 @@ unsigned int PerformLDF(const unsigned int opcode)
return
nRc
;
}
unsigned
int
PerformSTF
(
const
unsigned
int
opcode
)
static
unsigned
int
PerformSTF
(
const
unsigned
int
opcode
)
{
unsigned
int
*
pBase
,
*
pAddress
,
*
pFinal
,
nRc
=
1
,
target_ulong
pBase
,
pAddress
,
pFinal
;
unsigned
int
nRc
=
1
,
write_back
=
WRITE_BACK
(
opcode
);
//printk("PerformSTF(0x%08x), Fd = 0x%08x\n",opcode,getFd(opcode));
SetRoundingMode
(
ROUND_TO_NEAREST
);
pBase
=
(
unsigned
int
*
)
readRegister
(
getRn
(
opcode
));
pBase
=
readRegister
(
getRn
(
opcode
));
if
(
REG_PC
==
getRn
(
opcode
))
{
pBase
+=
2
;
pBase
+=
8
;
write_back
=
0
;
}
pFinal
=
pBase
;
if
(
BIT_UP_SET
(
opcode
))
pFinal
+=
getOffset
(
opcode
);
pFinal
+=
getOffset
(
opcode
)
*
4
;
else
pFinal
-=
getOffset
(
opcode
);
pFinal
-=
getOffset
(
opcode
)
*
4
;
if
(
PREINDEXED
(
opcode
))
pAddress
=
pFinal
;
else
pAddress
=
pBase
;
...
...
@@ -289,23 +283,24 @@ unsigned int PerformSTF(const unsigned int opcode)
return
nRc
;
}
unsigned
int
PerformLFM
(
const
unsigned
int
opcode
)
static
unsigned
int
PerformLFM
(
const
unsigned
int
opcode
)
{
unsigned
int
i
,
Fd
,
*
pBase
,
*
pAddress
,
*
pFinal
,
unsigned
int
i
,
Fd
,
write_back
=
WRITE_BACK
(
opcode
);
target_ulong
pBase
,
pAddress
,
pFinal
;
pBase
=
(
unsigned
int
*
)
readRegister
(
getRn
(
opcode
));
pBase
=
readRegister
(
getRn
(
opcode
));
if
(
REG_PC
==
getRn
(
opcode
))
{
pBase
+=
2
;
pBase
+=
8
;
write_back
=
0
;
}
pFinal
=
pBase
;
if
(
BIT_UP_SET
(
opcode
))
pFinal
+=
getOffset
(
opcode
);
pFinal
+=
getOffset
(
opcode
)
*
4
;
else
pFinal
-=
getOffset
(
opcode
);
pFinal
-=
getOffset
(
opcode
)
*
4
;
if
(
PREINDEXED
(
opcode
))
pAddress
=
pFinal
;
else
pAddress
=
pBase
;
...
...
@@ -313,7 +308,7 @@ unsigned int PerformLFM(const unsigned int opcode)
for
(
i
=
getRegisterCount
(
opcode
);
i
>
0
;
i
--
)
{
loadMultiple
(
Fd
,
pAddress
);
pAddress
+=
3
;
Fd
++
;
pAddress
+=
12
;
Fd
++
;
if
(
Fd
==
8
)
Fd
=
0
;
}
...
...
@@ -321,23 +316,24 @@ unsigned int PerformLFM(const unsigned int opcode)
return
1
;
}
unsigned
int
PerformSFM
(
const
unsigned
int
opcode
)
static
unsigned
int
PerformSFM
(
const
unsigned
int
opcode
)
{
unsigned
int
i
,
Fd
,
*
pBase
,
*
pAddress
,
*
pFinal
,
unsigned
int
i
,
Fd
,
write_back
=
WRITE_BACK
(
opcode
);
target_ulong
pBase
,
pAddress
,
pFinal
;
pBase
=
(
unsigned
int
*
)
readRegister
(
getRn
(
opcode
));
pBase
=
readRegister
(
getRn
(
opcode
));
if
(
REG_PC
==
getRn
(
opcode
))
{
pBase
+=
2
;
pBase
+=
8
;
write_back
=
0
;
}
pFinal
=
pBase
;
if
(
BIT_UP_SET
(
opcode
))
pFinal
+=
getOffset
(
opcode
);
pFinal
+=
getOffset
(
opcode
)
*
4
;
else
pFinal
-=
getOffset
(
opcode
);
pFinal
-=
getOffset
(
opcode
)
*
4
;
if
(
PREINDEXED
(
opcode
))
pAddress
=
pFinal
;
else
pAddress
=
pBase
;
...
...
@@ -345,7 +341,7 @@ unsigned int PerformSFM(const unsigned int opcode)
for
(
i
=
getRegisterCount
(
opcode
);
i
>
0
;
i
--
)
{
storeMultiple
(
Fd
,
pAddress
);
pAddress
+=
3
;
Fd
++
;
pAddress
+=
12
;
Fd
++
;
if
(
Fd
==
8
)
Fd
=
0
;
}
...
...
linux-user/arm/nwfpe/fpopcode.c
浏览文件 @
65a650c2
...
...
@@ -59,21 +59,6 @@ const float32 float32Constant[] = {
0x41200000
/* single 10.0 */
};
unsigned
int
getTransferLength
(
const
unsigned
int
opcode
)
{
unsigned
int
nRc
;
switch
(
opcode
&
MASK_TRANSFER_LENGTH
)
{
case
0x00000000
:
nRc
=
1
;
break
;
/* single precision */
case
0x00008000
:
nRc
=
2
;
break
;
/* double precision */
case
0x00400000
:
nRc
=
3
;
break
;
/* extended precision */
default:
nRc
=
0
;
}
return
(
nRc
);
}
unsigned
int
getRegisterCount
(
const
unsigned
int
opcode
)
{
unsigned
int
nRc
;
...
...
@@ -90,21 +75,6 @@ unsigned int getRegisterCount(const unsigned int opcode)
return
(
nRc
);
}
unsigned
int
getRoundingPrecision
(
const
unsigned
int
opcode
)
{
unsigned
int
nRc
;
switch
(
opcode
&
MASK_ROUNDING_PRECISION
)
{
case
0x00000000
:
nRc
=
1
;
break
;
case
0x00000080
:
nRc
=
2
;
break
;
case
0x00080000
:
nRc
=
3
;
break
;
default:
nRc
=
0
;
}
return
(
nRc
);
}
unsigned
int
getDestinationSize
(
const
unsigned
int
opcode
)
{
unsigned
int
nRc
;
...
...
@@ -141,8 +111,3 @@ static const unsigned short aCC[16] = {
0xFFFF
,
// AL always
0
// NV
};
unsigned
int
checkCondition
(
const
unsigned
int
opcode
,
const
unsigned
int
ccodes
)
{
return
(
aCC
[
opcode
>>
28
]
>>
(
ccodes
>>
28
))
&
1
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录