Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

GCC 4.6.x invalid code generation (Developers)

posted by RayeR Homepage, CZ, 10.04.2012, 03:58

> care to minimize targets for such "old" tech, presumably. Esp. since most
> Linux distros don't actively support anything older than 686 anymore.

But there are still used and manufactured various low-power embedded PCs with old and simple x86 core like vortex86 and other SoC with 386/486 core, even may lack FPU. Linux can run on such machines well so they should care...

> Only a good emulator perhaps, which will segfault or crash on invalid
> opcode. Doesn't QEMU have a -cpu flag? Otherwise, it's difficult because of
> self-modifying code and inadvertently disassembling data (which looks like
> code but isn't). E.g. DOSBox only supports a 486 DX with CPUID, nothing
> newer, so it's easy to test (crash!) there, heh.

Running the program is not enough good test. Code may branch widely depending on input data so you don't have a chance to test all the code runtime...

> I think that's a false positive. I'd be very surprised. I've run "stock"
> DJGPP on 586 machines before, so that can't be it. Unless you mean a recent
> compile of CVS snapshot with latest GCC 4.6.x, which is where the bug lies.
> Certainly "stock" DJGPP libc and libm from 2.03p2 used GCC 2.8.1 (no 686
> optimizations available) and GCC 3.3.2 for 2.04 (and IIRC that never had
> any problems on my 586 [Pentium 166 with no MMX]).

As you can see from file dates I use updated/CVS DJDEV. But now I become suspicious to objdump. It detected CMOVs in libm.a even from very old djdev 2.03. I tried older 3.x GCC and still getting CMOVs in some object files. I also found, that X264 use CMOV in some assembler source modules so it cannot be disabled. So this may be the reason why FFMPEG crashed on some compression target and din't crashed on other. But as I said I found CMOV also in .o files compiled from .c files that doesn't have inline ASM or anything else indicating CMOV. Even more confusing is that CMOV was produced also with GCC 3.x. When I tried to compile .C file into assembler .S file I didn't see CMOV there. So objdump is just kidding me or WTF? It seem's the right time to go sleep now... :P

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum