1 /* BraIA64.c -- Converter for IA-64 code
2 2017-01-26 : Igor Pavlov : Public domain */
9 SizeT
IA64_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
)
18 unsigned m
= ((UInt32
)0x334B0000 >> (data
[i
] & 0x1E)) & 3;
24 Byte
*p
= data
+ (i
+ (size_t)m
* 5 - 8);
25 if (((p
[3] >> m
) & 15) == 5
26 && (((p
[-1] | ((UInt32
)p
[0] << 8)) >> m
) & 0x70) == 0)
28 unsigned raw
= GetUi32(p
);
29 unsigned v
= raw
>> m
;
30 v
= (v
& 0xFFFFF) | ((v
& (1 << 23)) >> 3);
42 raw
&= ~((UInt32
)0x8FFFFF << m
);