Skip to content

Inconsistency between optfor value assignment and struct documentation #2

Description

@ThirstyWraith

While the PGlobalOptimizer optfor member is set as

if (strcmp(token, "speed") == 0) {
    opt->optfor = 2;
    return 1;
}
if (strcmp(token, "space") == 0 || strcmp(token, "size") == 0) {
    opt->optfor = 1;
    return 1;
}

The struct's comment says
UInt8 optfor; /* 0x03: 0=default, 1=speed, 2=space */
Verify which one is correct for PPC.
MIPS uses different values altogether, with 0=speed, 1=space.
PR #1 assumes space=1, speed=2 during argument parsing to be intended behavior and sets MIPS optfor as space, unless speed was specified, which mimics IDE default behavior.
ctx->prefsOptimizer.optfor = (ctx->prefsOptimizer.optfor == 2) ? 0 : 1;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions