반응형


SIMD 의 종류와 MMX

 

여기서는 Intel x86 아키텍쳐의 SIMD 만 설명하겠습니다.

먼저 Pentium 시리즈와 함께 처음 나온 MMX 가 있습니다.

이 집합은 FPU(x87) 에서 사용되는 레지스터를 공유해서 사용합니다.

즉 따로 MMX 용 레지스터가 존재하지는 않습니다.

 

그리고 MMX 후에 나온 SSE 가 있습니다.

아마 모두 한 번쯤은 들어보셨을 정도로 대표적인 SIMD 입니다.

(이름 자체도 Streaming SIMD Extensions 의 약자입니다.)

xmm 이라는 128비트 레지스터 8개가 추가되어 SIMD 전용 레지스터로 사용됩니다.

http://cafe.naver.com/cafec/243004



EMMS 를 사용하는 이유는 


The EMMS Instruction: Why You Need It

Using EMMS is like emptying a container to accommodate new content. The EMMS instruction clears the MMX™ registers and sets the value of the floating-point tag word to empty.

You should clear the MMX™ registers before issuing a floating-point instruction because floating-point convention specifies that the floating-point stack be cleared after use. Insert the EMMS instruction at the end of all MMX™ code segments to avoid a floating-point overflow exception.

Why You Need EMMS to Reset After an MMX™ Instruction





CAUTION

Failure to empty the multimedia state after using an MMX™ technology instruction and before using a floating-point instruction can result in unexpected execution or poor performance.

https://software.intel.com/en-us/node/524274




반응형

+ Recent posts