¥¢¥»¥ó¥Ö¥é¤Ë¾Ü¤·¤¤Êý¶µ¤¨¤Æ¤¯¤À¤µ¤¤



[ ¤³¤Î¥á¥Ã¥»¡¼¥¸¤Ø¤ÎÊÖ»ö ] [ ÊÖ»ö¤ò½ñ¤¯ ] [ home.html ]



Åê¹Æ¼Ô¡§ 68user @ oryo.inforyoma.or.jp on 97/9/20 19:44:29

a[i] = h + a[i];

¤òMIPS¤Î¥¢¥»¥ó¥Ö¥é¤Ç½ñ¤¯¤È
# $18=h¡¢$19=i*sizeof(i)¡¢Astart=&a[0]

lw $8,Astart($19)¢³ # $8=a[i]
add $8,$18,$8¢³¢³¢³ # $8+=h
sw $8,Astart($19)¢³ # a[i]=$8

¤È¤Ê¤ê¤Þ¤¹¤¬¡¢lw¤ÎAstart¤ÎÉôʬ¤Ï¥Þ¥·¥ó¸ì¤Ç¤Ï16bitʬ¤·¤«
»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤¹¤ë¤È&a[0]>=2^16¤Î¾ì¹ç¤É¤¦¤Ê¤ë
¤ó¤Ç¤·¤ç¤¦¤«¡©

1¡¢Astart ¤Ë 2^16 °Ê¾å¤ÎÃͤòÆþ¤ì¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
¢³¥æ¡¼¥¶¤¬ Astrat>=2^16 ¤È¤Ê¤é¤Ê¤¤¤è¤¦¤Ëµ¤¤ò¤Ä¤±¤Æ¡¢¤â¤·
¢³Astrat>=2^16 ¤Ê¤é¤Ð $19¤Ë¥ª¡¼¥Ð¡¼¤·¤¿Ê¬¤ò²Ã»»¤·¤Ê¤±¤ì¤Ð
¢³¤Ê¤é¤Ê¤¤¡£¤½¤â¤½¤âRISC¤Ê¤ó¤À¤«¤é¥¢¥»¥ó¥Ö¥é¤Ç½ñ¤¯¤Ê¡£
¢³¥³¥ó¥Ñ¥¤¥é¤ò»È¤¨¡£

2¡¢lw ¤Ïµ¿»÷Ì¿Îá¤Ç¤¢¤ë¡£
¢³¥¢¥»¥ó¥Ö¥é¤¬ Astart>=2^16 ¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤·¡¢¤â¤·
¢³Astrat>=2^16 ¤Ê¤é¤Ð $19¤Ë¥ª¡¼¥Ð¡¼¤·¤¿Ê¬¤ò²Ã»»¤¹¤ë¤è¤¦¤Ê
¢³¥³¡¼¥É¤òÀ¸À®¤·¤Æ¤¯¤ì¤ë

¤Î¤É¤Á¤é¤Ç¤·¤ç¤¦¤«¡£¤¢¤ë¤¤¤Ï¤½¤ì°Ê³°¤Ç¤·¤ç¤¦¤«¡£
¤¼¤Ò¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£