@@ -2913,6 +2913,8 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
29132913 SETFLAGS (X_OF | X_CF , SF_SUBSET , NAT_FLAGS_FUSION );
29142914 GETED (0 );
29152915 ANDI (x6 , xRCX , rex .w ? 0x3f : 0x1f );
2916+ if (!rex .w && !rex .is32bits && MODREG ) ZEROUP (ed );
2917+ CBZ_NEXT (x6 );
29162918 emit_rol32 (dyn , ninst , rex , ed , x6 , x3 , x4 );
29172919 WBACK ;
29182920 if (!wback && !rex .w ) ZEROUP (ed );
@@ -2925,6 +2927,8 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
29252927 SETFLAGS (X_OF | X_CF , SF_SUBSET , NAT_FLAGS_FUSION );
29262928 GETED (0 );
29272929 ANDI (x6 , xRCX , rex .w ? 0x3f : 0x1f );
2930+ if (!rex .w && !rex .is32bits && MODREG ) ZEROUP (ed );
2931+ CBZ_NEXT (x6 );
29282932 emit_ror32 (dyn , ninst , rex , ed , x6 , x3 , x4 );
29292933 WBACK ;
29302934 if (!wback && !rex .w ) ZEROUP (ed );
@@ -2984,7 +2988,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
29842988 }
29852989 ANDI (x3 , xRCX , rex .w ? 0x3f : 0x1f );
29862990 GETED (0 );
2987- if (!rex .w && MODREG ) ZEROUP (ed );
2991+ if (!rex .w && ! rex . is32bits && MODREG ) ZEROUP (ed );
29882992 CBZ_NEXT (x3 );
29892993 emit_shl32 (dyn , ninst , rex , ed , x3 , x5 , x4 , x6 );
29902994 WBACK ;
@@ -3013,7 +3017,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
30133017 }
30143018 ANDI (x3 , xRCX , rex .w ? 0x3f : 0x1f );
30153019 GETED (0 );
3016- if (!rex .w && MODREG ) ZEROUP (ed );
3020+ if (!rex .w && ! rex . is32bits && MODREG ) ZEROUP (ed );
30173021 CBZ_NEXT (x3 );
30183022 emit_shr32 (dyn , ninst , rex , ed , x3 , x5 , x4 );
30193023 WBACK ;
@@ -3027,13 +3031,10 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
30273031 SETFLAGS (X_ALL , SF_SET_PENDING , NAT_FLAGS_FUSION );
30283032 ANDI (x3 , xRCX , rex .w ? 0x3f : 0x1f );
30293033 GETED (0 );
3030- if (!rex .w && MODREG ) { ZEROUP (ed ); }
3034+ if (!rex .w && ! rex . is32bits && MODREG ) { ZEROUP (ed ); }
30313035 CBZ_NEXT (x3 );
3032- UFLAG_OP12 (ed , x3 );
3033- SRAxw (ed , ed , x3 );
3036+ emit_sar32 (dyn , ninst , rex , ed , x3 , x5 , x4 );
30343037 WBACK ;
3035- UFLAG_RES (ed );
3036- UFLAG_DF (x3 , rex .w ? d_sar64 : d_sar32 );
30373038 break ;
30383039 default :
30393040 DEFAULT ;
0 commit comments