public void insertSpace(AddrSpace spc) { // Add new space to the list, verify name and id conventions
		boolean nametype_mismatch = false;
		boolean duplicatedefine = false;
		switch (spc.getType()) {
			case IPTR_CONSTANT:
				if (!spc.getName().equals(SpaceNames.CONSTANT_SPACE_NAME)) {
					nametype_mismatch = true;
				}
				if (baselist.size() != 0) {
					throw new LowlevelError("const space must be initialized first");
				}
				constantspace = spc;
				break;
			case IPTR_INTERNAL:
				if (!spc.getName().equals(SpaceNames.UNIQUE_SPACE_NAME)) {
					nametype_mismatch = true;
				}
				if (uniqspace != null) {
					duplicatedefine = true;
				}
				uniqspace = spc;
				break;
			case IPTR_FSPEC:
				if (!spc.getName().equals(SpaceNames.FSPEC_SPACE_NAME)) {
					nametype_mismatch = true;
				}
				if (fspecspace != null) {
					duplicatedefine = true;
				}
				fspecspace = spc;
				break;
			case IPTR_IOP:
				if (!spc.getName().equals(SpaceNames.IOP_SPACE_NAME)) {
					nametype_mismatch = true;
				}
				if (iopspace != null) {
					duplicatedefine = true;
				}
				iopspace = spc;
				break;
			case IPTR_SPACEBASE:
				if (spc.getName().equals(SpaceNames.STACK_SPACE_NAME)) {
					if (stackspace != null) {
						duplicatedefine = true;
					}
					stackspace = spc;
				}
				// fallthru
			case IPTR_PROCESSOR:
				if (spc.isOtherSpace()) {
					if (spc.getIndex() != SpaceNames.OTHER_SPACE_INDEX) {
						throw new LowlevelError("OTHER space must be assigned index 1");
					}
				}
				for (AddrSpace space : baselist) {
					if (space.getName().equals(spc.getName())) {
						duplicatedefine = true;
					}
				}
				break;
		}
		if (nametype_mismatch) {
			throw new LowlevelError("Space " + spc.getName() + " was initialized with wrong type");
		}
		if (duplicatedefine) {
			throw new LowlevelError("Space " + spc.getName() + " was initialized more than once");
		}
		if (baselist.size() != spc.getIndex()) {
			throw new LowlevelError("Space " + spc.getName() + " was initialized with a bad id");
		}
		baselist.add(spc);
	}
Retrieve a particular spacebase register associated with the virtual address space
basespace.  This register serves as a base offset to anchor basespace within
its containing space.
@param basespace is the virtual space to find a spacebase register for
@param i is the index of the particular spacebase register
@return a reference to the spacebase register
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/translate/Translate.java