@Override
	public TaintVec unaryOp(int opcode, int sizeout, int sizein1, TaintVec in1) {
		switch (opcode) {
			case PcodeOp.COPY:
			case PcodeOp.BOOL_NEGATE:
			case PcodeOp.INT_NEGATE:
				return in1;
			case PcodeOp.INT_ZEXT:
				return in1.extended(sizeout, endian.isBigEndian(), false);
			case PcodeOp.INT_SEXT:
				return in1.extended(sizeout, endian.isBigEndian(), true);
			case PcodeOp.INT_2COMP:
				return in1.copy().setCascade(endian.isBigEndian());
			default:
				return TaintVec.copies(in1.union(), sizeout);
		}
	}
{@inheritDoc}

<p>
We can't just naively return {@code in1}, because each unary op may mix the bytes of the
operand a little differently. For {@link PcodeOp#COPY}, we can, since no mixing happens at
all. This is also the case of both {@code NEGATE} operations ("negate" is a bit of a
misnomer, as they merely inverts the bits.) For {@link PcodeOp#INT_ZEXT}, we append empties
to the correct end of the vector. Similarly, we replicate the most-significant element and
append for {@link PcodeOp#INT_SEXT}. For {@link PcodeOp#INT_2COMP} (which negates an integer
in 2's complement), we have to consider that the "add one" step may cause a cascade of
carries. All others, we assume every byte could be tainted by any other byte in the vector,
so we union and broadcast.
Ghidra/Debug/TaintAnalysis/src/main/java/ghidra/pcode/emu/taint/TaintPcodeArithmetic.java