public static void getPcodeForPutStatic(PcodeOpEmitter pCode, int index,
			AbstractConstantPoolInfoJava[] constantPool) {
		String descriptor = getDescriptorForFieldRef(constantPool, index);

		switch (descriptor.charAt(0)) {
			case DescriptorDecoder.BASE_TYPE_BYTE:  //signed byte
				pCode.emitPopCat1Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitTruncate(TEMP_1, 1, NEW_VALUE);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 1, STATIC_OFFSET,
					TEMP_1);
				break;
			case DescriptorDecoder.BASE_TYPE_BOOLEAN:  //boolean
				pCode.emitPopCat1Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitTruncate(TEMP_1, 1, NEW_VALUE);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 1, STATIC_OFFSET,
					TEMP_1);
				break;
			case DescriptorDecoder.BASE_TYPE_CHAR:  //char
				pCode.emitPopCat1Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitTruncate(TEMP_1, 2, NEW_VALUE);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 2, STATIC_OFFSET,
					TEMP_1);
				break;
			case DescriptorDecoder.BASE_TYPE_SHORT:  //signed short
				pCode.emitPopCat1Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitTruncate(TEMP_1, 2, NEW_VALUE);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 2, STATIC_OFFSET,
					TEMP_1);
				break;
			case DescriptorDecoder.BASE_TYPE_ARRAY:  //array dimension
			case DescriptorDecoder.BASE_TYPE_FLOAT:  //float
			case DescriptorDecoder.BASE_TYPE_INT:  //int
			case DescriptorDecoder.BASE_TYPE_REFERENCE:  //object reference
				pCode.emitPopCat1Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 4, STATIC_OFFSET,
					NEW_VALUE);
				break;
			case DescriptorDecoder.BASE_TYPE_DOUBLE:  //double
			case DescriptorDecoder.BASE_TYPE_LONG:  //long
				pCode.emitPopCat2Value(NEW_VALUE);
				pCode.emitAssignVarnodeFromPcodeOpCall(STATIC_OFFSET, 4,
					ConstantPoolJava.CPOOL_OP, "0", Integer.toString(index),
					ConstantPoolJava.CPOOL_PUTSTATIC);
				pCode.emitWriteToMemory(PcodeOpEmitter.RAM, 8, STATIC_OFFSET,
					NEW_VALUE);
				break;
			default:
				throw new IllegalArgumentException("Invalid descriptor: " + descriptor);
		}
	}
Generate a String of pcode for a putstatic op.
@param pCode is the pcode accumulator
@param index - the index of the field reference in the constant pool
@param constantPool - the constant pool of the class file
Ghidra/Processors/JVM/src/main/java/ghidra/app/util/pcodeInject/ReferenceMethods.java