Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2018-04

Vectorcall Fix

2 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

Hi everyone,

Sorry this took so long.  There was a bug in my "vectorcall" submission in that if you specified "vectorcall" on a method under Linux (it might have been specifically a virtual method), it stored Self in RCX instead of RDI, rather than silently ignoring the Windows-only calling convention.

Patch is here: https://bugs.freepascal.org/view.php?id=33542

The fix was surprisingly simple - it was an oversight in the "x86_64_use_ms_abi" function - all it took was the removal of a single keyword.

Compilation was tested under Ubuntu 16.04 (in VirtualBox) and Windows 10 and the vectorcall tests in "tests/test/cg" run without error.

Gareth aka. Kit

Reply by email

J. Gareth Moreton

I should probably add that this bug was first reported here (I forgot about it):

https://bugs.freepascal.org/view.php?id=33184

My own patch submission to fix said bug is effectively a duplicate of #33184, and #33184 is related to #32781, if anyone is willing to set up those relationships in the bug tracker.

Gareth aka. Kit

On Sun 01/04/18 02:07 , "J. Gareth Moreton"
sent:
Hi everyone,

Sorry this took so long.  There was a bug in my "vectorcall" submission in that if you specified "vectorcall" on a method under Linux (it might have been specifically a virtual method), it stored Self in RCX instead of RDI, rather than silently ignoring the Windows-only calling convention.

Patch is here: https://bugs.freepascal.org/view.php?id=33542

The fix was surprisingly simple - it was an oversight in the "x86_64_use_ms_abi" function - all it took was the removal of a single keyword.

Compilation was tested under Ubuntu 16.04 (in VirtualBox) and Windows 10 and the vectorcall tests in "tests/test/cg" run without error.

Gareth aka. Kit _______________________________________________

Reply by email