Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Compiler pragmas: CPU optimizations 1999-11-01 -- Arie Rens > It sounds a bit strange to me that the same optimization is used for
> Pentium as 286 (setting it to Pentium will throw it back to 286 if I
> recall correctly)
This is related to the #pragma optimize(cpu=>86|286|386|486) project statement
(C5 programmers guide page 261), which dates back to the TopSpeed 3 GL compilers
(and Clarion for DOS 3.x).
As you see this pragma does not have a setting cpu=>Pentium (or cpu=>586), which
is probably the reason why it is not stored, and then becomes the default value
286.
When I tested it (either with TS Modula-2 3.10 or CDD 3.0) some years ago, using
the TopSpeed disassembler to inspect the generated code, I found clear
differences between the 86, 286 and 386 settings. The 486 setting produced the
same code as the 386, and if I remember correctly I verified this with SuRF, who
at that time did the TopSpeed 3GL support, and he confirmed the code generated
for the 386 and 486 was (at least at that time) the same.
This is why I was so careful to use the 286 and 386 in my example, because I
knew that the code generated for these was likely to be different
Today is November 21, 2024, 7:45 am This article has been viewed 35341 times.
|
|