@Override
	public void emitCode(GluonOutput code) {
		if (exp2 == null) {
			exp1.emitCode(code);
			return;
		}
		
		exp1.emitCode(code);		
		code.code("PUSH EAX");
		exp2.emitCode(code);
		code.code("POP EBX");
		code.code("CMP EAX, EBX");
		
		switch (compare){
			case EQUALS:
				code.code("SETE AL");
				break;
			case LESS_THAN:
				code.code("SETG AL");
				break;
			case LESS_THAN_OR_EQUALS:
				code.code("SETGE AL");
				break;
			case GREATER_THAN:
				code.code("SETL AL");
				break;
			case GREATER_THAN_OR_EQUALS:
				code.code("SETLE AL");
				break;
			case NOT_EQUALS:
				code.code("SETNE AL");
				break;
			default:
				throw new RuntimeException("Unknown compare type.");
		}
	}