This preview shows page 1. Sign up to view the full content.
Unformatted text preview: .32 we show just a single form of the subtraction operation fsub. In fact, this operation comes in 182 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS many different variants, as shown in Figure 3.33. All compute the difference of two operands: ÇÔ ½ ÇÔ ¾ and store the result in some ﬂoating-point register. Beyond the simple subp instruction we considered for the hypothetical stack evaluator, IA32 has instructions that read their second operand from memory or from some ﬂoating-point register other than %st(1). In addition, there are both popping and nonpopping variants. The ﬁrst group of instructions reads the second operand from memory, either in single-precision, double-precision, or integer format. It then converts this to extended-precision format, subtracts it from the top stack element, and overwrites the top stack element. These can be seen as a combination of a ﬂoating-point load following by a stack-based subtraction operation. The second group of subtraction instructions use the top stack element as one argument an...
View Full Document
- Spring '10
- The American