<DIV>Hello,</DIV>
<DIV>the following codes below comes from the file of u-boot\l<SPAN lang="EN-US"><FONT face="Times New Roman">ib_mips\octeon_boot.c. I don't know the function of the ".set push", and I don't know which type of the "push", symbol,dirctive or others?</FONT></SPAN></DIV>
<DIV><SPAN lang="EN-US"><FONT face="Times New Roman">I read this section, but make me more confused.</FONT></SPAN></DIV>
<DIV><SPAN lang="EN-US"><FONT face="Times New Roman">Please help me, thanks!</FONT></SPAN></DIV>
<DIV><SPAN lang="EN-US"><FONT face="Times New Roman">
<H3><A name="SEC120"><U>.set</U></A></H3>
<P>Syntax: <B>.set <I>symbol</I>, <I>expression</I></B> <BR><BR>Set the value of <I>symbol</I> to <I>expression</I>. This changes <I>symbol</I>'s value and type to conform to <I>expression</I>. If <I>symbol</I> was flagged as external, it remains flagged (see <A href="http://tigcc.ticalc.org/doc/gnuasm.html#SEC50">Symbol Attributes</A>). <BR><BR>You may <CODE><FONT face="新宋体">.set</FONT></CODE> a symbol many times in the same assembly. <BR><BR>If you <CODE><FONT face="新宋体">.set</FONT></CODE> a global symbol, the value stored in the object file is the last value stored into it.</P></FONT></SPAN></DIV>
<DIV>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman">void octeon_write64(uint64_t csr_addr, uint64_t val)</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman">{</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>volatile uint32_t val_low<SPAN style="mso-spacerun: yes"> </SPAN>= val & 0xffffffff;</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>volatile uint32_t val_high = val<SPAN style="mso-spacerun: yes"> </SPAN>>> 32;</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><o:p><FONT face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>volatile uint32_t addr_low<SPAN style="mso-spacerun: yes"> </SPAN>= csr_addr & 0xffffffff;</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>volatile uint32_t addr_high = csr_addr<SPAN style="mso-spacerun: yes"> </SPAN>>> 32;</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><o:p><FONT face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>asm volatile (</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>.set push<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>.set mips64<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>.set noreorder<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>/* Standard twin 32 bit -> 64 bit construction */</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsll<SPAN style="mso-spacerun: yes"> </SPAN>%[valh], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsll<SPAN style="mso-spacerun: yes"> </SPAN>%[vall], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsrl<SPAN style="mso-spacerun: yes"> </SPAN>%[vall], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>daddu %[valh], %[valh], %[vall]<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>/* Combined value is in valh */</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>/* Standard twin 32 bit -> 64 bit construction */</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsll<SPAN style="mso-spacerun: yes"> </SPAN>%[addrh], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsll<SPAN style="mso-spacerun: yes"> </SPAN>%[addrl], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>dsrl<SPAN style="mso-spacerun: yes"> </SPAN>%[addrl], 32<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>daddu %[addrh], %[addrh], %[addrl]<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>/* Combined value is in addrh */</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>sd %[valh], 0(%[addrh])<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN>"<SPAN style="mso-spacerun: yes"> </SPAN>.set pop<SPAN style="mso-spacerun: yes"> </SPAN>\n"</FONT></SPAN></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"><SPAN lang="EN-US"><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN lang="EN-US" style="FONT-SIZE: 9pt"><SPAN style="mso-spacerun: yes"> </SPAN>: : [valh] "r" (val_high), [vall] "r" (val_low), [addrh] "r" (addr_high), [addrl] "r" (addr_low): "memory");<o:p></o:p></SPAN></FONT></P>
<P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><SPAN lang="EN-US"><FONT face="Times New Roman">}</FONT></SPAN></P></DIV><br><!-- footer --><br>
<hr>
<font style="font-size:12px;line-height:15px;"></font><a style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" href="http://popme.163.com/link/003982_0523_567.html">瑞雪春堂 即将开启</a>