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

use ENTER instruction only for 16-bit codegen #5073

Closed
wants to merge 1 commit into from

Conversation

MartinNowak
Copy link
Member

No description provided.

@MartinNowak
Copy link
Member Author

@WalterBright
Copy link
Member

This is not true for 16 bit code generation, which is still supported by the code generator. In addition, ENTER is shorter, and so is appropriate when being optimized for space, also supported by the code generator. It can't be removed wholesale.

I'm not sure which CPU made ENTER slower, but the code generator supports quite a number of CPU specific optimizations from the 8088 (!) to the present.

@WalterBright
Copy link
Member

If ENTER appears in speed optimized code, then fix that and reopen this.

@adamdruppe
Copy link
Contributor

D doesn't support 16 bit code anyway... can you at least like #ifdef it if this code is shared with dmc? (BTW I still kinda like dmc's 16 bit support, but dmd doesn't need it)

@Temtaime
Copy link
Contributor

16 bit in 2015? Are you joking?

@Safety0ff
Copy link
Contributor

IIRC valgrind doesn't support ENTER/LEAVE, and its use was supposed to be removed (atleast on IA-32 & amd64)
https://issues.dlang.org/show_bug.cgi?id=11788

@WalterBright
Copy link
Member

D doesn't support 16 bit code anyway...

But dmc does, and the code generator is shared, and the dmc test suite does a lot of code gen checking that the dmd suite does not.

can you at least like #ifdef it if this code is shared with dmc?

I've been trying to remove all the #ifdef's because I'd eventually like to convert the source code to D. Besides, I cannot identify any detriment to having a test for I16 here and there.

@WalterBright
Copy link
Member

valgrind doesn't support ENTER/LEAVE

One wonders why valgrind doesn't support the complete instruction set.

@WalterBright
Copy link
Member

16 bit in 2015?

dmc is the only compiler supporting DOS that is still maintained. There are users of it I support.

@MartinNowak
Copy link
Member Author

Updated to only use ENTER for 16-bit codegen.

@MartinNowak MartinNowak changed the title don't use ENTER instruction use ENTER instruction only for 16-bit codegen Sep 14, 2015
@WalterBright
Copy link
Member

There's no reason to not use ENTER/LEAVE for 32/64 bit code when optimizing for space on Windows. Valgrind doesn't run on Windows, so Valgrind's bugs are irrelevant.

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

Successfully merging this pull request may close these issues.

5 participants