aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/juicebox_asm/imm.rs.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/juicebox_asm/imm.rs.html')
-rw-r--r--src/juicebox_asm/imm.rs.html28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/juicebox_asm/imm.rs.html b/src/juicebox_asm/imm.rs.html
index 78f4a8b..e0b6592 100644
--- a/src/juicebox_asm/imm.rs.html
+++ b/src/juicebox_asm/imm.rs.html
@@ -48,6 +48,19 @@
<a href="#48" id="48">48</a>
<a href="#49" id="49">49</a>
<a href="#50" id="50">50</a>
+<a href="#51" id="51">51</a>
+<a href="#52" id="52">52</a>
+<a href="#53" id="53">53</a>
+<a href="#54" id="54">54</a>
+<a href="#55" id="55">55</a>
+<a href="#56" id="56">56</a>
+<a href="#57" id="57">57</a>
+<a href="#58" id="58">58</a>
+<a href="#59" id="59">59</a>
+<a href="#60" id="60">60</a>
+<a href="#61" id="61">61</a>
+<a href="#62" id="62">62</a>
+<a href="#63" id="63">63</a>
</pre></div><pre class="rust"><code><span class="doccomment">//! Definition of different immediate types which are used as input operands for various
//! instructions.
@@ -96,6 +109,19 @@
);
<span class="macro">impl_imm!</span>(
<span class="doccomment">/// Type representing a 64 bit immediate.
- </span>Imm64, <span class="number">8</span>, from: { u64, i64, u32, i32, u16, i16, u8, i8 }
+ </span>Imm64, <span class="number">8</span>, from: { u64, i64, u32, i32, u16, i16, u8, i8, usize, isize }
);
+
+<span class="attr">#[cfg(test)]
+</span><span class="kw">mod </span>test {
+ <span class="kw">use super</span>::<span class="kw-2">*</span>;
+ <span class="kw">use </span>std::mem::size_of;
+
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>test_usize_isize() {
+ <span class="comment">// Imm64 should not implementd from usize/isize if this fails.
+ </span><span class="macro">assert_eq!</span>(size_of::&lt;usize&gt;(), size_of::&lt;Imm64&gt;());
+ <span class="macro">assert_eq!</span>(size_of::&lt;isize&gt;(), size_of::&lt;Imm64&gt;());
+ }
+}
</code></pre></div></section></main></body></html> \ No newline at end of file