[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'mmx' (#rtl)

emms

Reset floating point registers

Declaration

Source position: mmx.pp line 52

procedure emms;

Description

Emms sets all floating point registers to empty. This procedure must be called after you have used any MMX instructions, if you want to use floating point arithmetic. If you just want to move floating point data around, it isn't necessary to call this function, the compiler doesn't use the FPU registers when moving data. Only when doing calculations, you should use this function. The following code demonstrates this:

Program MMXDemo;
uses mmx;
var
   d : double;
   a : array[0..10000] of double;
   i : longint;
begin
   d:=1.0;
{$mmx+}
   { floating point data is used, but we do _no_ arithmetic }
   for i:=0 to 10000 do
     a[i]:=d;  { this is done with 64 bit moves }
{$mmx-}
   emms;   { clear fpu }
   { now we can do floating point arithmetic again }
end. 

See also

femms

  

Reset floating point registers - AMD version


Documentation generated on: Jun 23 2021