private Value emitIndexingCode(ArrayDesignator d, BasicBlock cur)
        throws Exception {
        ArrayList<Value> index = d.getIndex();
        if(index.size() != multipliers.length) {
            throw new Exception("Error, incorrect number of array indexes");
        }
        ArrayIndex rval =  new ArrayIndex(global ? getGBP() : getFP(), getAddr(d), multipliers, index);
        cur.addInstruction(rval);
        return rval;
    }