/
参阅:
阐明:ARM根底:ARM中“字”的长度。
/
(这儿不评论一个“汉字”代表两个“字节”的问题,这个差点都搅扰我了都)
在学习汇编时用到了LDRHR2,[R1] ;将存储器地址为R1的半字数据读入寄存器R2,并将R2的高16位清零。曾经没有听过字这个这个概念,就很纠结。就引起了我澄清“字”的长度的好奇心。字到底有多少个字节,这是一个很不流畅的问题,都特别是这样的解说:
“在核算机范畴,关于某种特定的核算机规划而言,字是用于表明其天然的数据单位的术语。在这个特定核算机中,字是其用来一次性处理事务的一个固定长度的位(bit)组。一个字的位数(即字长)是核算机体系结构中的一个重要特性。”
便是不理解,不过上边的LDRHR2,[R1]试验结果是R1指向的内存地址的16bit都给了R2,阐明“字”是32位的。可是当我用Win7上的核算器时却发现了另一种状况。如下图可见,一个“字”,却给出了16bit。
这更激怒我了,非要搞理解不行了。在google时在wiki上找到了答案,这个“字”并不是固定的,关于X86来说是16位,关于ARM来说是32位。(链接这儿)
对各个架构都做了字长的核算,转来看看。
这就阐明谁都没有错了,Win7自带的核算器是依照x86的规范来的。要想用这个核算器来核算ARM中的字,要用这儿的“双字”来代表ARM中的一个“字”。
字长表
年份 |
核算机 |
字长 |
整数 |
浮点数 |
长度 |
编址单位 |
字符 |
|
1941 |
ZuseZ3 |
22b |
– |
w |
8b |
w |
– |
|
1942 |
ABC |
50b |
w |
– |
– |
– |
– |
|
1944 |
HarvardMarkI |
23d |
w |
– |
24b |
– |
– |
|
1946 |
ENIAC |
10d |
w,2w |
– |
– |
– |
– |
|
1951 |
UNIVACI |
12d |
w |
– |
½w |
w |
1d |
|
1952 |
IASmachine |
40b |
w |
– |
½w |
w |
5b |
|
1952 |
IBM701 |
36b |
½w,w |
– |
½w |
½w,w |
6b |
|
1952 |
UNIVAC60 |
nd |
1d,…10d |
– |
– |
– |
2d,3d |
|
1953 |
IBM702 |
nd |
0d,…511d |
– |
5d |
d |
1d |
|
1953 |
UNIVAC120 |
nd |
1d,…10d |
– |
– |
– |
2d,3d |
|
1954 |
IBM650 |
10d |
w |
– |
w |
w |
2d |
|
1954 |
IBM704 |
36b |
w |
w |
w |
w |
6b |
|
1954 |
IBM705 |
nd |
0d,…255d |
– |
5d |
d |
1d |
|
1954 |
IBMNORC |
16d |
w |
w,2w |
w |
w |
– |
|
1956 |
IBM305 |
nd |
1d,…100d |
– |
10d |
d |
1d |
|
1958 |
UNIVACII |
12d |
w |
– |
½w |
w |
1d |
|
1958 |
SAGE |
32b |
½w |
– |
w |
w |
6b |
|
1958 |
AutoneticsRecompII |
40b |
w,79b,8d,15d |
2w |
½w |
½w,w |
5b |
|
1959 |
IBM1401 |
nd |
1d,… |
– |
d,2d,4d,5d,7d,8d |
d |
1d |
|
1959 |
IBM1620 |
nd |
2d,… |
– |
12d |
d |
2d |
|
1960 |
LARC |
12d |
w,2w |
w,2w |
w |
w |
2d |
|
1960 |
IBM1410 |
nd |
1d,… |
– |
d,2d,6d,7d,11d,12d |
d |
1d |
|
1960 |
IBM7070 |
10d |
w |
w |
w |
w,d |
2d |
|
1960 |
PDP-1 |
18b |
w |
– |
w |
w |
6b |
|
1961 |
IBM7030 |
64b |
1b,…64b, |
w |
½w,w |
b,½w,w |
1b,…8b |
|
1961 |
IBM7080 |
nd |
0d,…255d |
– |
5d |
d |
1d |
|
1962 |
UNIVACIII |
25b,6d |
w,2w,3w,4w |
– |
w |
w |
6b |
|
1962 |
UNIVAC1107 |
36b |
1/6w,⅓w,½w,w |
w |
w |
w |
6b |
|
1962 |
IBM7010 |
nd |
1d,… |
– |
d,2d,6d,7d,11d,12d |
d |
1d |
|
1962 |
IBM7094 |
36b |
w |
w,2w |
w |
w |
6b |
|
1963 |
GeminiGuidanceComputer |
39b |
26b |
– |
13b |
13b,26b |
– |
|
1963 |
ApolloGuidanceComputer |
15b |
w |
– |
w,2w |
w |
– |
|
1964 |
CDC6600 |
60b |
w |
w |
¼w,½w |
w |
6b |
|
1965 |
IBM360 |
32b |
½w,w, |
w,2w |
½w,w,1½w |
8b |
8b |
|
1965 |
UNIVAC1108 |
36b |
1/6w,¼w,⅓w,½w,w,2w |
w,2w |
w |
w |
6b,9b |
|
1965 |
PDP-8 |
12b |
w |
– |
w |
w |
8b |
|
1970 |
PDP-11 |
16b |
w |
2w,4w |
w,2w,3w |
8b |
8b |
|
1971 |
Intel4004 |
4b |
w,d |
– |
2w,4w |
w |
– |
|
1972 |
Intel8008 |
8b |
w,2d |
– |
w,2w,3w |
w |
8b |
|
1972 |
Calcomp900 |
9b |
w |
– |
w,2w |
w |
8b |
|
1974 |
Intel8080 |
8b |
w,2w,2d |
– |
w,2w,3w |
w |
8b |
|
1975 |
Cray-1 |
64b |
24b,w |
w |
¼w,½w |
w |
8b |
|
1975 |
Motorola6800 |
8b |
w,2d |
– |
w,2w,3w |
w |
8b |
|
1975 |
MOSTech.6501 |
8b |
w,2d |
– |
w,2w,3w |
w |
8b |
|
1976 |
ZilogZ80 |
8b |
w,2w,2d |
– |
w,2w,3w,4w,5w |
w |
8b |
|
1978 |
Intel8086 |
16b |
½w,w,2d |
– |
½w,w,…7w |
8b |
8b |
|
1978 |
VAX-11/780 |
32b |
¼w,½w,w,1d,…31d,1b,…32b |
w,2w |
¼w,…14¼w |
8b |
8b |
|
1979 |
Motorola68000 |
32b |
¼w,½w,w,2d |
– |
½w,w,…7½w |
8b |
8b |
|
1982 |
Motorola68020 |
32b |
¼w,½w,w,2d |
– |
½w,w,…7½w |
8b |
8b |
|
1985 |
ARM1 |
32b |
w |
– |
w |
8b |
8b |
|
1985 |
MIPS |
32b |
¼w,½w,w |
w,2w |
w |
8b |
8b |
|
1989 |
Intel80486 |
16b |
½w,w,2d |
2w,4w,5w,17d |
½w,w,…7w |
8b |
8b |
|
1989 |
Motorola68040 |
32b |
¼w,½w,w,2d |
w,2w,2½w |
½w,w,…7½w |
8b |
8b |
|
1991 |
PowerPC |
32b |
¼w,½w,w |
w,2w |
w |
8b |
8b |
|
2000 |
IA-64 |
64b |
8b,¼w,½w,w |
½w,w |
41b |
8b |
8b |
|
2002 |
XScale |
32b |
w |
w,2w |
½w,w |
8b |
8b |
|
阐明:b:位,d:10进制数,w:该构架的字长,n:变量长度(variablesize) |