For oating point however the condition codes are part

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 floating 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

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online