assembler/mnemonic_parameter_types/immediates/
Immediate64Bit.rs

1// This file is part of assembler. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/assembler/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2018 The developers of assembler. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/assembler/master/COPYRIGHT.
3
4
5impl_immediate!(Immediate64Bit, i64, u64);
6
7impl From<Immediate8Bit> for Immediate64Bit
8{
9	#[inline(always)]
10	fn from(immediate: Immediate8Bit) -> Self
11	{
12		Self::from(immediate.0)
13	}
14}
15
16impl From<Immediate16Bit> for Immediate64Bit
17{
18	#[inline(always)]
19	fn from(immediate: Immediate16Bit) -> Self
20	{
21		Self::from(immediate.0)
22	}
23}
24
25impl From<Immediate32Bit> for Immediate64Bit
26{
27	#[inline(always)]
28	fn from(immediate: Immediate32Bit) -> Self
29	{
30		Self::from(immediate.0)
31	}
32}
33
34impl From<u8> for Immediate64Bit
35{
36	#[inline(always)]
37	fn from(immediate: u8) -> Self
38	{
39		Immediate64Bit(immediate as i64)
40	}
41}
42
43impl From<i8> for Immediate64Bit
44{
45	#[inline(always)]
46	fn from(immediate: i8) -> Self
47	{
48		Immediate64Bit(immediate as i64)
49	}
50}
51
52impl From<u16> for Immediate64Bit
53{
54	#[inline(always)]
55	fn from(immediate: u16) -> Self
56	{
57		Immediate64Bit(immediate as i64)
58	}
59}
60
61impl From<i16> for Immediate64Bit
62{
63	#[inline(always)]
64	fn from(immediate: i16) -> Self
65	{
66		Immediate64Bit(immediate as i64)
67	}
68}
69
70impl From<u32> for Immediate64Bit
71{
72	#[inline(always)]
73	fn from(immediate: u32) -> Self
74	{
75		Immediate64Bit(immediate as i64)
76	}
77}
78
79impl From<i32> for Immediate64Bit
80{
81	#[inline(always)]
82	fn from(immediate: i32) -> Self
83	{
84		Immediate64Bit(immediate as i64)
85	}
86}