This preview shows page 1. Sign up to view the full content.
Unformatted text preview: store at D Negate top stack element Pop top two stack elements; Push their sum Pop top two stack elements; Push their difference Pop top two stack elements; Push their product Pop top two stack elements; Push their ratio Figure 3.29: Hypothetical Stack Instruction Set. These instructions are used to illustrate stack-based expression evaluation
18 19 20 printf("test3 t2: r1 %f %c= r2 %f\n", (double) r1, t2 ? ’=’ : ’!’, (double) r2); } code/asm/fcomp.c The declaration long double is allowed as part of the ANSI C standard, although for most machines and compilers this declaration is equivalent to an ordinary double. For GCC on IA32 machines, however, it uses the extended-precision format for memory data as well as for ﬂoating point register data. This allows us to take full advantage of the wider range and greater precision provided by the extended-precision format while avoiding the anomalies we have seen in our earlier examples. Unfortunately, this solution comes at a price. G CC uses...
View Full Document