作者svanavs (svanavs)
看板Grad-ProbAsk
标题Re: [理工] [计组]-MIPS问题
时间Wed Sep 2 20:58:44 2009
※ 引述《li918272002 (水蓝微风)》之铭言:
: 各位板大可以请教一题题目吗??~
: 感谢~~
: Q:
: R8 = 0x11223344
: R9 = 0xFADEABAD
: R10 = 0x55667788
: What is final value of R2 in hexadecimal, using all eight
: digits (that is write 0x00000000 and not 0x0), after the
: execution of each sequence of instructions, for both
: little- and big-endian machines? If any access in the
: sequence is misaligned, write'misaligned' instead of an answer.
不懂 "misaligned" 是什麽意思 ?
假设 memmory 位置low => high 对应 左=>右
有错请鞭~
- Little-Endian - Big-Endian
---------------------------------------------------------------
- -
STW R9, 0(R8) - -
LDW R2, 0(R8) - 0xFADEABAD - 0xFADEABAD
- -
----------------------------------------------------------------
- -
STB R9, 3(R8) - -
LDB R2, 3(R8) - 0xFFFFFFAD - 0xFA000000
- -
------------------------------------------------------------------
- -
STB R9, 3(R8) - -
LDBU R2, 3(R8) - 0x000000AD - 0xFA000000
- -
------------------------------------------------------------------
- -
STH R9,1(R8) - -
LDB R2,1(R8) - 0xFFFFFFAD - 0xFA000000
- -
-------------------------------------------------------------------
STW R10,0(R8) - -
LDB R2,1(R8) - 0x00000077 - 0x66000000
- -
-------------------------------------------------------------------
STW R10,0(R8) - -
LDH R2,2(R8) - 0x00005566 - 0x77880000
- -
-------------------------------------------------------------------
- -
STH R10,2(R8) - 0x00000077 - 0x66000000
LDB R2,3(R8) - -
--
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 60.198.131.51