On Tue, Sep 23, 2014 at 6:41 PM, Andrew Haley <a...@redhat.com> wrote:
>
> And neither are they used by the asm; so you have no right to expect %edx
> to contain anything, and neither have you the right to touch it.
>
> Do this:
>
>      asm volatile (
>      "pushl      %1;"
>      "call       *%%eax;"
>      "addl       $4, %%esp;"
>      : "=a"(status) : "m"(params_ptr), "a"(pcall), "d"(d)
>      );
>
>
> "If you lie to the compiler, it will get its revenge." -- Henry Spencer
>
> Andrew.
>

Thanks for the hint.

But doing "d"(d) does not fix the problem and gcc still refuses to generate
codes for "params.a = d;". Seems to me adding "d"(d) only guarantee parameter
d is put into %edx, nothing else.

Regards,
Bin

Reply via email to