Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fp_delay_until is ignored when the uppermost bit is set #93

Open
magnmaeh opened this issue May 11, 2024 · 1 comment
Open

fp_delay_until is ignored when the uppermost bit is set #93

magnmaeh opened this issue May 11, 2024 · 1 comment
Labels

Comments

@magnmaeh
Copy link
Collaborator

magnmaeh commented May 11, 2024

Minimal reproducing example:

#include <flexpret/flexpret.h>
int main(void) {
    fp_delay_until(0xFFFFFFFF);
    return 0;
}

Running the program should keep the emulator going "forever", but it exits almost immediately because the delay until seems to get ignored. This does not happen for fp_delay_until(0x7FFFFFFFF);. (Where the uppoermost bit is not set.)

From waveforms, it seems that the sleep_du signal does not get set from the delay until instruction.

@magnmaeh magnmaeh added the bug label May 11, 2024
@magnmaeh
Copy link
Collaborator Author

One theory was that this was an optimization issue; the compiler might generate different assembly code for a higher int literal. But that is not the case - I tried doing this for -O0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant