Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #47311
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Was just wondering when people started using C to write forth languages and not assembly? |
| Date | 2016-05-19 15:07 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2016May19.170745@mips.complang.tuwien.ac.at> (permalink) |
| References | <622db793-14c4-48e5-a732-686c0b759db5@googlegroups.com> <bab50d16-da18-4f2a-985a-ca6ba38655d0@googlegroups.com> <e8740f36-5269-4006-8a81-3a15bc816fbe@googlegroups.com> <slrnnjrl6f.c59.albert@cherry.spenarnc.xs4all.nl> |
Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> writes:
>It is generally assumed that assembler causes portability problems.
So, how many (and which) targets do you maintain for your
assembly-based Forth systems.
>However that is offset by the greater effort needed to keep a huge
>system (gforth) based on an even larger system (the gnu compiler
>collection) afloat, versus the ultimate transparency of assembler
>language. A defect in an obscure corner of gcc can cause problems
>for gforth. There can be doubt about whether a particular change
>is a defect or not. Also there are other changes that are considered
>an improvement by some, and a miscompilation by others.
Yes, the recent (actually, not that recent anymore, but more recent
than our decision to use GNU C) attitude problems of C compiler
maintainers are a problem, and that's why we plan to move away from C.
But these problems did not exist when we and most other people who
wrote Forth systems that use C for the primitives decided to use C.
>A defect in fasm directly contradicts Intel data sheets, there is no
>weasling out.
Yes, with the current attitude of C compiler maintainers, assembly
language is much more reliable and solid than C. Also, the number of
relevant architectures is shrinking, so the additional portability
effort for assembly language is getting smaller.
>Complicated processors like the latest 64-bit Intel, need so many
>expert knowledge to get optimal code, that it is likely to be spent
>only once. In the case of gcc that is around C, with benefits
>spreading out to related languages like C++.
Except that the GCC maintainers don't have that expert knowledge (I
certainly have not seen any evidence of such knowledge, and have seen
evidence of lack of such knowledge). Instead, they (and their brethren
in mind from the LLVM/Clang camp) prefer to play around with enhancing
the intermediate representation with "knowledge" about undefined
behaviour and how they can use that for "optimizations" rather than
concentrating on real optimizations, where expert knowledge about
processors would be useful.
However, the thing about expert knowledge is not new. E.g., when we
started with Gforth, we made a performance comparison with a Forth
system written in assembly language by Bernd Beuster, and Gforth was
faster. Why? Because Beuster's Forth used LODS (4 cycles on the 486)
in NEXT, while GCC used two simpler instructions (each 1 cycle on the
486) instead. This was on the 486, a CPU introduced in 1989. Bernd
Beuster fixed his system, but many systems continued to use LODS for a
long time, because once, on the 8086, it was a good idea.
Intel and AMD are publishing nice optimization manuals. Read them!
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Was just wondering when people started using C to write forth languages and not assembly? Darin Murphy <murphy.darin@gmail.com> - 2016-05-18 11:31 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? visualforth@rocketmail.com - 2016-05-18 13:11 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-18 12:42 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-05-18 20:38 -0400
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-18 18:00 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? pahihu <pahihu@gmail.com> - 2016-05-19 01:00 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-05-19 19:14 -0400
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-19 14:44 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-19 13:28 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-19 11:29 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-18 17:56 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Darin Murphy <murphy.darin@gmail.com> - 2016-05-18 19:26 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-18 20:16 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-18 17:51 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-18 20:54 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? JUERGEN <epldfpga@aol.com> - 2016-05-20 10:49 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? humptydumpty <ouatubi@gmail.com> - 2016-05-19 01:59 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Darin Murphy <murphy.darin@gmail.com> - 2016-05-19 12:04 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-19 13:58 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-19 15:07 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Ron Aaron <rambamist@gmail.com> - 2016-05-19 19:21 +0300
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 12:44 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Ron Aaron <rambamist@gmail.com> - 2016-05-20 16:14 +0300
Re: Was just wondering when people started using C to write forth languages and not assembly? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-05-20 15:28 +0200
Re: Was just wondering when people started using C to write forth languages and not assembly? stephen@mpeforth.com (Stephen Pelc) - 2016-05-20 13:50 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-05-20 07:31 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-20 08:39 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-21 18:04 -0700
Re: Was just wondering when people started using C to write forthlanguages and not assembly? "WJ" <w_a_x_man@yahoo.com> - 2016-05-23 14:04 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? stephen@mpeforth.com (Stephen Pelc) - 2016-05-20 20:48 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-22 20:38 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Ron Aaron <rambamist@gmail.com> - 2016-05-23 07:03 +0300
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-22 21:22 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-23 23:21 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? stephen@mpeforth.com (Stephen Pelc) - 2016-05-24 09:36 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? foxaudioresearch@gmail.com - 2016-05-24 08:02 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-24 15:34 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-05-25 05:43 -0500
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-25 13:43 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-24 09:40 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-24 10:09 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? stephen@mpeforth.com (Stephen Pelc) - 2016-05-24 20:24 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-24 14:32 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? stephen@mpeforth.com (Stephen Pelc) - 2016-05-25 09:34 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-25 09:52 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-26 10:02 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? hughaguilar96@gmail.com - 2016-05-26 10:19 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? "WJ" <w_a_x_man@yahoo.com> - 2016-05-25 01:18 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-22 21:15 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-05-20 09:47 -0500
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 15:02 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-05-20 11:42 -0500
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 16:52 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-20 10:07 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 17:12 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-20 10:25 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 17:41 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-20 11:12 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-21 05:33 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-05-20 21:13 +0200
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-20 15:24 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Paul Rubin <no.email@nospam.invalid> - 2016-05-20 09:45 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? Bernd Paysan <bernd.paysan@gmx.de> - 2016-06-02 01:01 +0000
Native Gforth Lars Brinkhoff <lars.spam@nocrew.org> - 2016-06-02 08:37 +0200
Re: Native Gforth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-06-02 12:54 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-06-02 12:34 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-19 18:35 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Darin Murphy <murphy.darin@gmail.com> - 2016-05-19 12:07 -0700
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-20 12:48 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? "Elizabeth D. Rather" <erather@forth.com> - 2016-05-19 10:33 -1000
Re: Was just wondering when people started using C to write forth languages and not assembly? Ron Aaron <rambamist@gmail.com> - 2016-05-19 07:04 +0300
Re: Was just wondering when people started using C to write forth languages and not assembly? Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2016-05-19 08:09 +0200
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-19 07:43 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-19 08:13 +0000
Re: Was just wondering when people started using C to write forth languages and not assembly? Darin Murphy <murphy.darin@gmail.com> - 2016-05-20 22:27 -0400
csiph-web