View Issue Details

IDProjectCategoryView StatusLast Update
0036674FPCCompilerpublic2020-02-07 11:52
ReporterSimBen Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platformintel x86OSwindows 10 pro 
Product Version3.0.4 
Summary0036674: Assembler call with win64
DescriptionConsider the program
var x,y:double;
Function atan2(Y,X:double):double; assembler;
  asm
  fldl y
  fldl x
  fpatan
  fwait
  end;
begin
x:=3;
y:=2;
write(atan2(y,x):9:3);
readln;
end.

The compilation works normally in win32 (and the result after running is correct), but the compilation generates the following error (two times) in win64
 Asm: [fld xmmreg] invalid combination of opcode and operands

Additional InformationSame issues with windows 7 pro
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Sven Barth

2020-02-07 11:50

manager   ~0120917

Last edited: 2020-02-07 11:52

View 2 revisions

Accessing the x87 FPU is not supported on Win64 (*). You need to use SSE instructions for that.

(*) In theory you can, but you first need to move the variables that are in SSE registers to normal registers and then to the FPU, but a context switch could mess that up (Microsoft doesn't do that currently due to 32-bit applications, but they have documented that and could do it if they want).

Issue History

Date Modified Username Field Change
2020-02-07 11:38 SimBen New Issue
2020-02-07 11:50 Sven Barth Assigned To => Sven Barth
2020-02-07 11:50 Sven Barth Status new => resolved
2020-02-07 11:50 Sven Barth Resolution open => no change required
2020-02-07 11:50 Sven Barth FPCTarget => -
2020-02-07 11:50 Sven Barth Note Added: 0120917
2020-02-07 11:52 Sven Barth Note Edited: 0120917 View Revisions