diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-02-24 11:04:48 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-04-26 12:50:29 +0200 |
| commit | ba691dc06911663b5cbfbba7d2cff91ee14b71df (patch) | |
| tree | 089da18e60b8c39d2bcd68fdf59947e8371e0f3c | |
| parent | a4b68c16b2adcffc912de45baf2ddfb3aa8ad15b (diff) | |
| download | miasm-ba691dc06911663b5cbfbba7d2cff91ee14b71df.tar.gz miasm-ba691dc06911663b5cbfbba7d2cff91ee14b71df.zip | |
Jitter/x86: Fix rshift64
| -rw-r--r-- | miasm2/jitter/vm_mngr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/jitter/vm_mngr.h b/miasm2/jitter/vm_mngr.h index 52d62551..eb972392 100644 --- a/miasm2/jitter/vm_mngr.h +++ b/miasm2/jitter/vm_mngr.h @@ -377,6 +377,8 @@ unsigned int load_tr_segment_selector(unsigned int d); ((((short)(a)) >> ((int)(b)&0x1f))&0xffff) #define shift_right_arith_32(a, b)\ ((((int)(a)) >> ((int)(b)&0x1f))&0xffffffff) +#define shift_right_arith_64(a, b)\ + ((((int64_t)(a)) >> ((int64_t)(b)&0x3f))&0xffffffffffffffff) #define shift_right_logic_08(a, b)\ @@ -386,7 +388,7 @@ unsigned int load_tr_segment_selector(unsigned int d); #define shift_right_logic_32(a, b)\ ((((unsigned int)(a)) >> ((unsigned int)(b)&0x1f))&0xffffffff) #define shift_right_logic_64(a, b)\ - ((((int64_t)(a)) >> ((int64_t)(b)&0x3f))&0xffffffffffffffff) + ((((uint64_t)(a)) >> ((uint64_t)(b)&0x3f))&0xffffffffffffffff) #define shift_left_logic_08(a, b)\ (((a)<<((b)&0x1f))&0xff) |