|
|
|
|
| 请问sdata段和data段的使用上的区别是什么? |
 请问sdata段和data段的使用上的区别是什么? - nibbling [ 2005-07-30 17:17 | 231 byte(s)]
 Re: 请问sdata段和data段的使用上的区别是什么? - BNN [ 2005-07-31 00:17 | 199 byte(s)]
 Re: 请问sdata段和data段的使用上的区别是什么? - nibbling [ 2005-07-31 21:04 | 12 byte(s)]
 Re: 请问sdata段和data段的使用上的区别是什么? - BNN [ 2005-07-30 21:59 | 209 byte(s)]
 Re: 请问sdata段和data段的使用上的区别是什么? - nibbling [ 2005-07-30 22:07 | 69 byte(s)]
 Re: 请问sdata段和data段的使用上的区别是什么? - BNN [ 2005-07-31 00:15 | 286 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
看网上解释的好像只是一个长数据一个短数据,不知道在使用的时候到底有什么区别?
.data Read-write initialized long data.
.sdata Read-write initialized short data.
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
data: for read/write, need at least 2 instructions.
sdata: one instruction.
Take a look at the MIPS GP pointer/register and the compiler option usage. Also, read something online.
|
|
|
----
天若有情天亦老,人间正道是沧桑。
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
There are some default settings, for example, -G1 or -G2.
However, note that, for the I(mmediate) type Instruction, for MIPS, for example, the maximum of sdata is kind of 64K or so.
Find out the instruction format to get a more reading little bit.
|
|
|
----
天若有情天亦老,人间正道是沧桑。
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
不知道在使用的时候到底有什么区别?
BNN: For C level, you don't need get aware of this. Sometimes, you can tune data back and forth to those sections for performance consideration.
|
|
|
----
天若有情天亦老,人间正道是沧桑。
|
|
[Original]
[Print]
[Top]
|
|
|