Question: lwi ($reg, $ui, $li) : This macro takes two 16-bit immediate values $ui and $li and put them into higher bits and lower bits of

lwi ($reg, $ui, $li) : This macro takes two 16-bit immediate values $ui and $li and put them into higher bits and lower bits of $reg. For example lwi($s1, 0x5a5a, 0xa5a5) will place a value 0x5a5aa5a5 into $s1 register.

How do I make a macro for this?

.macro lwi ($reg, $ui, $li) lui $reg, $ui ori $reg, $reg, $li

I got this by playing around with it, but I have no idea how ori works. Can anyone explain?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!