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-wide</title> 7<link rel=stylesheet href="opcode.css"> 8</head> 9 10<body> 11 12<h1>const-wide</h1> 13 14<h2>Purpose</h2> 15 16<p> 17Move the given literal value (sign-extended to 64 bits) into the specified 18register-pair. 19</p> 20 21<h2>Details</h2> 22 23<table class="instruc"> 24<thead> 25<tr> 26 <th>Op & Format</th> 27 <th>Mnemonic / Syntax</th> 28 <th>Arguments</th> 29</tr> 30</thead> 31<tbody> 32<tr> 33 <td>16 21s</td> 34 <td>const-wide/16 vAA, #+BBBB</td> 35 <td><code>A:</code> destination register (8 bits)<br/> 36 <code>B:</code> signed int (16 bits)</td> 37</tr> 38<tr> 39 <td>17 31i</td> 40 <td>const-wide/32 vAA, #+BBBBBBBB</td> 41 <td><code>A:</code> destination register (8 bits)<br/> 42 <code>B:</code> signed int (32 bits)</td> 43</tr> 44<tr> 45 <td>18 51l</td> 46 <td>const-wide vAA, #+BBBBBBBBBBBBBBBB</td> 47 <td><code>A:</code> destination register (8 bits)<br/> 48 <code>B:</code> arbitrary double-width (64-bit) constant</td> 49</tr> 50<tr> 51 <td>19 21h</td> 52 <td>const-wide/high16 vAA, #+BBBB000000000000</td> 53 <td><code>A:</code> destination register (8 bits)<br/> 54 <code>B:</code> signed int (16 bits)</td> 55</tr> 56</tbody> 57</table> 58 59<h2>Constraints</h2> 60 61<ul> 62 <li> 63 A must be a valid register index in the current stack frame. 64 </li> 65</ul> 66 67<h2>Behavior</h2> 68 69<ul> 70 <li> 71 First, an adjusted value B' is determined as follows: 72 <ul> 73 <li> 74 If we are executing the /high16 variant, then B is left-shifted by 40 75 bits, that is, B'=B << 0x28 76 <li> 77 Otherwise, if B is a 16 bit or 32 bit constant, it is sign-extended to 78 64 bits, that is, B'=sign-extended(B). 79 </li> 80 <li> 81 Otherwise, B'=B. 82 </li> 83 </ul> 84 <li> 85 The immediate value B is moved into the register pair (vA, v(A+1)), that is, 86 <ul> 87 <li> 88 vA' = B << 0x20 89 </li> 90 <li> 91 v(A+1)' = B & 0xffffffff 92 </li> 93 </ul> 94 </li> 95 <li> 96 If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined. 97 </li> 98 <li> 99 If v(A+2) is the upper half of a register pair, v(A+2)' becomes undefined. 100 </li> 101</ul> 102 103<h2>Exceptions</h2> 104 105<p> 106None. 107</p> 108 109</body> 110</html> 111