comment on flushing predecode queue (pre-Pentium) (DOSX)
Hi ! By all means do try it on your 386 if you can, but be aware no amount of testing will validate this buggy code.
Unless you collected all revisions of all versions of x86 by all manufacturers,
(and yes, I successfully tried the offending code on my i486DX2-66 revision 5.)
1- programmer realises there is a problem (presumably he's been bitten...)
2- progammer makes up a story about needing an (unspecified) "delay" (between mode switch & segment reload).
3- programmer shuffles instructions, program seems to work. But the fix is wrong! Inserting only one mode-independent instruction between the move to CR0 and the move to DS (or whatever segment) isn't enough to ensure it will work on *all* IA32 processors and clone. The right and only fix is to make a jump, as I - and others, it seems - have explained.
It's amusing Japheth told me he desn't care about "theories", yet the programmer made up a bogus theory about 386/486 needing a delay as said in point 2 above; the truth is, not a delay is needed, but any predecoded instruction which depends on processor mode must be purged. An example, not involving segment load, would be executing an instruction invalid in real mode, such as LTR, just after setting Protect enable.
I hope this modest but crucial piece is corrected before it make its way to FreeDOS or other open-source projects. The fix is simple and proven.
Nuff said... I'm using Linux anyway ;=)
---
Ninho
Complete thread:
- comment on flushing predecode queue (pre-Pentium) - Ninho, 23.04.2008, 10:06 (DOSX)
- comment on flushing predecode queue (pre-Pentium) - Japheth, 23.04.2008, 19:54
- comment on flushing predecode queue (pre-Pentium) - Ninho, 23.04.2008, 20:22
- comment on flushing predecode queue (pre-Pentium) - Japheth, 23.04.2008, 21:04
- comment on flushing predecode queue (pre-Pentium) - Ninho, 23.04.2008, 23:32
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 24.04.2008, 19:18
- comment on flushing predecode queue (pre-Pentium) - RayeR, 24.04.2008, 22:34
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 08:11
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 08:58
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 09:23
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 09:31
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 09:52
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 10:00
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 10:09
- comment on flushing predecode queue (pre-Pentium) - Steve, 25.04.2008, 11:05
- comment on flushing predecode queue (pre-Pentium) - Steve, 25.04.2008, 11:04
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:11
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 11:18
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:21
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 11:24
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:41
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 13:57
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 14:34
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 13:57
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:41
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 11:24
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:21
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 11:34
- comment on flushing predecode queue (pre-Pentium) - Steve, 25.04.2008, 11:55
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 13:09
- comment on flushing predecode queue (pre-Pentium) - Steve, 25.04.2008, 14:18
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 13:09
- comment on flushing predecode queue (pre-Pentium) - Steve, 25.04.2008, 11:55
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 11:18
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 11:11
- comment on flushing predecode queue (pre-Pentium) - rr, 25.04.2008, 10:00
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 25.04.2008, 20:55
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 09:52
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 09:31
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 09:23
- comment on flushing predecode queue (pre-Pentium) - RayeR, 26.04.2008, 00:54
- comment on flushing predecode queue (pre-Pentium) - Japheth, 26.04.2008, 09:49
- comment on flushing predecode queue (pre-Pentium) - Ninho, 26.04.2008, 10:29
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 26.04.2008, 20:57
- comment on flushing predecode queue (pre-Pentium) - RayeR, 27.04.2008, 01:52
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 27.04.2008, 05:36
- comment on flushing predecode queue (pre-Pentium) - RayeR, 27.04.2008, 13:20
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 27.04.2008, 20:20
- comment on flushing predecode queue (pre-Pentium) - flox, 27.04.2008, 22:08
- comment on flushing predecode queue (pre-Pentium) - Steve, 28.04.2008, 02:44
- comment on flushing predecode queue (pre-Pentium) - flox, 27.04.2008, 22:08
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 27.04.2008, 20:20
- comment on flushing predecode queue (pre-Pentium) - marcov, 27.04.2008, 15:46
- comment on flushing predecode queue (pre-Pentium) - RayeR, 27.04.2008, 13:20
- comment on flushing predecode queue (pre-Pentium) - Ninho, 27.04.2008, 10:10
- comment on flushing predecode queue (pre-Pentium) - Japheth, 28.04.2008, 11:50
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 27.04.2008, 05:36
- comment on flushing predecode queue (pre-Pentium) - tom, 27.04.2008, 14:46
- HIMEMX bug - DOS386, 01.05.2008, 05:48
- HIMEMX bug - Japheth, 01.05.2008, 09:20
- comment on flushing predecode queue (pre-Pentium) - Ninho, 26.04.2008, 10:29
- comment on flushing predecode queue (pre-Pentium) - Japheth, 26.04.2008, 09:49
- comment on flushing predecode queue (pre-Pentium) - Japheth, 25.04.2008, 08:58
- comment on flushing predecode queue (pre-Pentium) - Ninho, 25.04.2008, 08:11
- comment on flushing predecode queue (pre-Pentium) - RayeR, 24.04.2008, 22:34
- comment on flushing predecode queue (pre-Pentium) - Rugxulo, 24.04.2008, 19:18
- comment on flushing predecode queue (pre-Pentium) - Ninho, 23.04.2008, 23:32
- comment on flushing predecode queue (pre-Pentium) - Japheth, 23.04.2008, 21:04
- comment on flushing predecode queue (pre-Pentium) - Ninho, 23.04.2008, 20:22
- comment on flushing predecode queue (pre-Pentium) - Japheth, 23.04.2008, 19:54