diff options
| author | Camille Mougey <commial@gmail.com> | 2016-04-26 13:22:44 +0200 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2016-04-26 13:22:44 +0200 |
| commit | 2c02857fa8f1dae2a5ecccbe399640b2ae0d446c (patch) | |
| tree | 089da18e60b8c39d2bcd68fdf59947e8371e0f3c | |
| parent | a4b68c16b2adcffc912de45baf2ddfb3aa8ad15b (diff) | |
| parent | ba691dc06911663b5cbfbba7d2cff91ee14b71df (diff) | |
| download | miasm-2c02857fa8f1dae2a5ecccbe399640b2ae0d446c.tar.gz miasm-2c02857fa8f1dae2a5ecccbe399640b2ae0d446c.zip | |
Merge pull request #358 from serpilliere/fix_x86_rshift
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) |