@@ -844,9 +844,7 @@ class emitter
844844 unsigned _idCustom5 : 1 ;
845845 unsigned _idCustom6 : 1 ;
846846
847- #define _idEvexbContext \
848- (_idCustom6 << 1 ) | _idCustom5 /* Evex.b: embedded broadcast, embedded rounding, embedded SAE \
849- */
847+ #define _idEvexbContext (_idCustom6 << 1 ) | _idCustom5 /* Evex.b: embedded broadcast, rounding, SAE */
850848#define _idEvexNdContext _idCustom5 /* bits used for the APX-EVEX.nd context for promoted legacy instructions */
851849#define _idEvexNfContext _idCustom6 /* bits used for the APX-EVEX.nf context for promoted legacy/vex instructions */
852850
@@ -1734,10 +1732,21 @@ class emitter
17341732 return idGetEvexbContext () != 0 ;
17351733 }
17361734
1735+ void idSetEvexBroadcastBit ()
1736+ {
1737+ assert (!idIsEvexbContextSet ());
1738+ _idCustom5 = 1 ;
1739+ }
1740+
1741+ void idSetEvexCompressedDisplacementBit ()
1742+ {
1743+ assert (_idCustom6 == 0 );
1744+ _idCustom6 = 1 ;
1745+ }
1746+
17371747 void idSetEvexbContext (insOpts instOptions)
17381748 {
17391749 assert (!idIsEvexbContextSet ());
1740- assert (idGetEvexbContext () == 0 );
17411750 unsigned value = static_cast <unsigned >(instOptions & INS_OPTS_EVEX_b_MASK);
17421751
17431752 _idCustom5 = ((value >> 0 ) & 1 );
@@ -4164,7 +4173,7 @@ emitAttr emitter::emitGetMemOpSize(instrDesc* id, bool ignoreEmbeddedBroadcast)
41644173 else if (tupleType == INS_TT_FULL)
41654174 {
41664175 // Embedded broadcast supported, so either loading scalar or full vector
4167- if (id-> idIsEvexbContextSet () && !ignoreEmbeddedBroadcast )
4176+ if (!ignoreEmbeddedBroadcast && HasEmbeddedBroadcast (id) )
41684177 {
41694178 memSize = GetInputSizeInBytes (id);
41704179 }
@@ -4183,7 +4192,7 @@ emitAttr emitter::emitGetMemOpSize(instrDesc* id, bool ignoreEmbeddedBroadcast)
41834192 {
41844193 memSize = 16 ;
41854194 }
4186- else if (id-> idIsEvexbContextSet () && !ignoreEmbeddedBroadcast )
4195+ else if (!ignoreEmbeddedBroadcast && HasEmbeddedBroadcast (id) )
41874196 {
41884197 memSize = GetInputSizeInBytes (id);
41894198 }
@@ -4195,7 +4204,7 @@ emitAttr emitter::emitGetMemOpSize(instrDesc* id, bool ignoreEmbeddedBroadcast)
41954204 else if (tupleType == INS_TT_HALF)
41964205 {
41974206 // Embedded broadcast supported, so either loading scalar or half vector
4198- if (id-> idIsEvexbContextSet () && !ignoreEmbeddedBroadcast )
4207+ if (!ignoreEmbeddedBroadcast && HasEmbeddedBroadcast (id) )
41994208 {
42004209 memSize = GetInputSizeInBytes (id);
42014210 }
0 commit comments