Author Topic: EC2000 - 64 Bit - Shadow stack space  (Read 765 times)

K_F

  • Member
  • *****
  • Posts: 1404
  • Anybody out there?
EC2000 - 64 Bit - Shadow stack space
« on: December 28, 2017, 05:49:21 PM »
Hi Ramon,
I'm still happily playing with EC  :t

A question on the ECInvoke macro :- Does it copy the 4 parameters into the stack shadow space, or does it leave that up to the programmer ? This wasn't clear in the EC help file.

It would be nice to leave that up to the programmer as it would give one more flexibility in manipulating registers etc.., saving a few instruction times.

Thanks
Van
 :t :t
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

rsala

  • Moderator
  • Member
  • *****
  • Posts: 274
    • Easy Code
Re: EC2000 - 64 Bit - Shadow stack space
« Reply #1 on: December 29, 2017, 11:24:13 PM »
Hi Van,

ECInvoke works perfectly well keeping always the stack 16-byte aligned and accepting all type of parameters (which are converted to QWORDS if they are not), but it DOES NOT COPY the 4 parameters into the stack shadow space.

The ECInvoke macro works under the WIN64 specifications, where the invoking code is not responsible for copying the parameters into the stack shadow space, in fact it should not copy them.

Regards,

Ramon
EC coder