Add missing `MemorySize.isBroadcast()` function
package com.github.icedland.iced.x86;
+import com.github.icedland.iced.x86.internal.IcedConstants;
+
/**
* Size of a memory reference
*/
@@ -65,6 +67,15 @@ public final class MemorySize {
return MemorySize.getInfo(memorySize).isSigned();
}
+ /**
+ * Checks if <code>memorySize</code> is a broadcast memory type
+ *
+ * @param memorySize Memory size (a {@link MemorySize} enum variant)
+ */
+ public static boolean isBroadcast(int memorySize) {
+ return Integer.compareUnsigned(memorySize, IcedConstants.FIRST_BROADCAST_MEMORY_SIZE) >= 0;
+ }
+
/**
* <code>true</code> if this is a packed data type, eg.<!-- --> {@link MemorySize#PACKED128_FLOAT32}
*
