Consider the following C function, where EXPR is a macro defined with #define: Below, we show the

Question:

Consider the following C function, where EXPR is a macro defined with #define:

double simplefun (double x) { return EXPR (x); }

Below, we show the AVX2 code generated for different definitions of EXPR, where value x is held in %xmm0. All of them correspond to some useful operation on floating-point values. Identify what the operations are. Your answers will require you to understand the bit patterns of the constant words being retrieved from memory.

A. 1 2 3 4 5 6 7 B. 1 vmovsd .LC1 (%rip), %xmm1 vandpd %xmm1, %xmmo, %xmmo .LC1: .long .long .long .long

C. 1 2 3 4 5 6 7 vmovsd .LC2 (%rip), %xmm1 vxorpd %xmm1, %xmm0, %xmmo .LC2: 0 .long .long .long 0 .long 0

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Systems A Programmers Perspective

ISBN: 9781292101767

3rd Global Edition

Authors: Randal E. Bryant, David R. O'Hallaron

Question Posted: