Home | History | Annotate | Download | only in opcodes
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 
      3 <html>
      4 
      5 <head>
      6 <title>const-string</title>
      7 <link rel=stylesheet href="opcode.css">
      8 </head>
      9 
     10 <body>
     11 
     12 <h1>const-string</h1>
     13 
     14 <h2>Purpose</h2>
     15 
     16 <p>
     17 Move a reference to the string specified by the given index into the specified
     18 register. 
     19 </p>
     20 
     21 <h2>Details</h2>
     22 
     23 <table class="instruc">
     24 <thead>
     25 <tr>
     26   <th>Op &amp; Format</th>
     27   <th>Mnemonic / Syntax</th>
     28   <th>Arguments</th>
     29 </tr>
     30 </thead>
     31 <tbody>
     32 <tr>
     33   <td>1a 21c</td>
     34   <td>const-string vAA, string@BBBB</td>
     35   <td><code>A:</code> destination register (8 bits)<br/>
     36     <code>B:</code> string index</td>
     37 </tr>
     38 <tr>
     39   <td>1b 31c</td>
     40   <td>const-string/jumbo vAA, string@BBBBBBBB</td>
     41   <td><code>A:</code> destination register (8 bits)<br/>
     42     <code>B:</code> string index</td>
     43 </tr>
     44 </tbody>
     45 </table>
     46 
     47 <h2>Constraints</h2>
     48 
     49 <ul>
     50   <li>
     51     A must be a valid register index in the current stack frame.
     52   </li>
     53   <li>
     54     B must be a valid index into the string constant pool.
     55   </li>     
     56 </ul>
     57 
     58 <h2>Behavior</h2>
     59 
     60 <ul>
     61   <li>
     62     A new java.lang.String object S is allocated on the heap and filled with the
     63     contents of string pool entry B.
     64   </li>
     65   <li>
     66     A reference to an internalized version of the new object is moved into
     67     register vA, that is, the instruction behaves as if vA' = S.intern() was
     68     called.
     69   </li>
     70   <li>
     71     If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined.
     72   </li>
     73   <li>
     74     If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
     75   </li> 
     76 </ul>
     77 
     78 <h2>Exceptions</h2>
     79 
     80 <p>
     81 None.
     82 </p>
     83 
     84 </body>
     85 </html>
     86