delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/19:55:56

Message-ID: <18@candrian.pcnet.ro>
Reply-To: candrian AT pcnet DOT pcnet DOT ro (Calin Andrian)
To: djgpp AT delorie DOT com
Date: Wed, 11 Jun 1997 20:34:19
Subject: Re: Inline AMS Help - OOPS
From: candrian AT pcnet DOT pcnet DOT ro (Calin Andrian)

Half an hour ago I wrote:

>extern __inline__ long fixmul(long op_a, long op_b)
>{
>  long result;
>
>  __asm__ __volatile__ ("imull %0; shrdl $16,%1,%0"
>                        : "=a" (result)
>                        : "0" (op_a), "d" (op_b));
>  return result;
>}

IT'S WRONG ! Sorry.
I looked again, and discovered. The center line should read:

  __asm__ __volatile__ ("imull %2; shrdl $16,%2,%0"

This time I tested it. It's OK.

Calin Andrian
candrian AT pcnet DOT pcnet DOT ro


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019