private static ValueReg readReg(CompileInfo ci, String p){
		if(p.charAt(0)!='r' && p.charAt(0)!='R'){
			makeDiagnostic(ci, Kind.ERROR, "expect.register");//$NON-NLS-1$
		}
		if(p.charAt(1)=='+' || p.charAt(1)=='-'){
			makeDiagnostic(ci, Kind.ERROR, "expect.number.for.register");//$NON-NLS-1$
		}
		int reg = readIntNum(ci, p.substring(1), true);
		if(reg<0 || reg>31){
			makeDiagnostic(ci, Kind.ERROR, "register.out.of.range", reg);//$NON-NLS-1$
		}
		return new ValueReg(reg);
	}