public static long signExtendValue(boolean isSigned, long value, int size) {
		if (isSigned && size < 8) {
			int sa = (8 /* sizeof(long) */ - size) * 8 /* bits per byte */;
			value <<= sa;
			value >>= sa;
		}
		return value;
	}
Negative equates must be sign extended to 64-bits to be properly stored in the table.
Compute the proper 64-bit value of a constant given its signedness and the number
of bytes used to store the constant.
@param isSigned is true if the equate is considered signed
@param value is the (unsigned) form of the constant
@param size is the number of bytes used to store the constant
@return the 64-bit extended value
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ConvertConstantTask.java