Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

x87 Tag unexpected value

PMatos
Débutant
506 Visites

I was playing with x87 part of the ISA. According to the combined ISA manual, section 9.6.2 it says:

 

> When an MMX instruction (other than the EMMS instruction) is executed, the processor changes the x87 FPU state as follows:
>
> * The entire x87 FPU tag word is set to the valid state (00B in all tag fields).

 

among other things but the FPU tag word value was the one I couldn't reproduce. I wrote the following:

section .data
quadword_data dq 0x1234567890abcdef

section .text

global _start

_start:

finit
fld1
fldpi
movq mm0, [quadword_data]
hlt

Before movq, the tag word is 0xfff as expected since top is at r6 and r6 and r7 are valid. But after movq I was expecting the tag word to be 0x0 but instead it's 0x556. Why is this and why does it differ with what's specified in the manual?

 

Thanks.

0 Compliments
0 Réponses
Répondre