[理工] 計組instructions 觀念小疑問

看板Grad-ProbAsk作者 (O_O)時間9年前 (2017/01/28 21:39), 9年前編輯推噓3(304)
留言7則, 3人參與, 最新討論串1/1
張凡有一題題目如下 a.若register縮減為8個 b.若常數縮減為10bits 1.會對R-type instruction長度造成什麼影響 a.less register -> less bit per instruction ->smaller code size b.smaller constants -> more lui instructions-> could increase code size 2.會對I-type 指令長度造成什麼影響 a.less register -> more register spills-> could increase code size b.smaller constants -> less bit per instruction ->smaller code size 其中,1b跟2a並不是很了解,想請問意思為何m(_ _)m -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.139.1.57 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1485610755.A.8F2.html ※ 編輯: ssssIssss (223.139.1.57), 01/28/2017 21:40:28

01/28 21:52, , 1F
2a,register spilling就是將不常用的值放到memory的過,
01/28 21:52, 1F

01/28 21:52, , 2F
因為較少的register會造成更多register spilling,就需
01/28 21:52, 2F

01/28 21:52, , 3F
要寫更多lw,sw的指令
01/28 21:52, 3F
但是這題的答案應該是在指單一個instruction的bit數會變多? 這麼樣來說,應該是儲存不常使用的變數變多所以造成memory使用的空間會變大,需要更 多bits才能存取到所需資料? ※ 編輯: ssssIssss (223.139.1.57), 01/28/2017 22:20:54

01/28 22:08, , 4F
1b, 我覺得是因為要計算較大的數值時,可能需要分解數值
01/28 22:08, 4F

01/28 22:08, , 5F
,不能一次計算
01/28 22:08, 5F
然後more lui instruction是指很常會使用到lui指令? 這麼一來就說的通了@@ ※ 編輯: ssssIssss (223.139.1.57), 01/28/2017 22:23:41

01/28 23:42, , 6F
我是這樣猜的啦XD
01/28 23:42, 6F
覺得很合理呀XD ※ 編輯: ssssIssss (140.112.94.109), 01/29/2017 11:02:58

01/30 11:56, , 7F
四樓猜得好合理哈哈 我也被感化了
01/30 11:56, 7F
文章代碼(AID): #1OZ9y3Zo (Grad-ProbAsk)