Mail Archives: djgpp/2013/12/11/14:20:31
This is a multi-part message in MIME format.
--------------030904060707070604030102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
On 11/28/2013 07:05 PM, DJ Delorie wrote:
>> I found this:
>> https://groups.google.com/forum/#!topic/comp.os.msdos.djgpp/WeMjxnR1NBc
>> which seems to indicate that GCC will output non-386 opcodes anyway :-(
> Only for atomic operations, which are typically only used when
> threading, and DJGPP doesn't support threading.
I did check with simple script (see attachment) under Linux in cross-compiler
libstdc++ build directory (therefore i586-pc-msdosdjgpp-objdump)
For gcc-4.8.2 I'm getting:
[andris AT ap libstdc++-v3]$ sh x1
==================================================
./src/c++98/atomicity.o
8: f0 0f c1 02 lock xadd %eax,(%edx)
==================================================
./libsupc++/eh_ptr.o
20: f0 0f c1 43 a0 lock xadd %eax,-0x60(%ebx)
11: f0 0f c1 50 a0 lock xadd %edx,-0x60(%eax)
==================================================
./libsupc++/eh_throw.o
12: f0 0f c1 50 c0 lock xadd %edx,-0x40(%eax)
==================================================
./libsupc++/eh_tm.o
f: f0 0f c1 03 lock xadd %eax,(%ebx)
for last gcc snapshot I have built (gcc-4.9.0-20131206)
[andris AT ap libstdc++-v3]$ sh search486.sh
==================================================
./libsupc++/cp-demangle.o
ce64: 0f cc bswap %esp
==================================================
./src/c++98/atomicity.o
8: f0 0f c1 02 lock xadd %eax,(%edx)
==================================================
./libsupc++/eh_ptr.o
21: f0 0f c1 43 a0 lock xadd %eax,-0x60(%ebx)
11: f0 0f c1 50 a0 lock xadd %edx,-0x60(%eax)
==================================================
./libsupc++/eh_throw.o
12: f0 0f c1 50 c0 lock xadd %edx,-0x40(%eax)
==================================================
./libsupc++/eh_tm.o
f: f0 0f c1 03 lock xadd %eax,(%ebx)
Additionally atomicity is used for exampple in libstdc++-v3/src/c++98/ios_init.cc
xadd is available on 486+, so libstdc++ is unusable for 80386.
Andris
--------------030904060707070604030102
Content-Type: application/x-shellscript;
name="search486.sh"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="search486.sh"
IyEgL2Jpbi9zaApzZWFyY2hfd29yZHM9ImJzd2FwIGNtcHhjaGcgeGFkZCIKc3JjX2ZpbGVz
PSQoZmluZCAuIC10eXBlIGYgLWEgLW5hbWUgJyoubycpCmZvciB3IGluICRzZWFyY2hfd29y
ZHMgOyBkbwogICAgZm9yIHggaW4gJHNyY19maWxlcyA7IGRvCiAgICAgICAgaWYgaTU4Ni1w
Yy1tc2Rvc2RqZ3BwLW9iamR1bXAgLS1kaXNhc3NlbWJsZSAkeCB8IGdyZXAgJHcgID5kaXNh
c20udG1wIDsgdGhlbgogICAgICAgICAgICBlY2hvICc9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PScKICAgICAgICAgICAgZWNobyAkeAogICAg
ICAgICAgICBjYXQgZGlzYXNtLnRtcAogICAgICAgIGZpCiAgICBkb25lCmRvbmUK
--------------030904060707070604030102--
- Raw text -