• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using floating point instructions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using floating point instructions


  • Subject: Re: Using floating point instructions
  • From: Greg Parker <email@hidden>
  • Date: Tue, 06 Dec 2016 13:41:53 -0800

> On Dec 6, 2016, at 7:27 AM, G 3 <email@hidden> wrote:
>
> I'm working on a program that calls PowerPC assembly floating point instructions from C. It would have calls like this:
>
> double inputA, inputB, answer;
> asm volatile("fadd %0, %1, %2" : "=f" (answer) : "f" (inputA), "f" (inputB));   // answer = inputA + inputB
>
> The odd thing is it only works in the debug configuration in XCode. In Release configuration, I see this error:
> error: output constraint 0 must specify a single register
> error: output operand 0 must use '&' constraint
>
> Is there a way to fix this problem?

You'll get better answers from a clang list such as email@hidden. Most of the audience here probably does not have a copy of clang that can compile PowerPC code.

Why are you using constraint "f" here? I would expect you to use "d" with variables of type double.


--
Greg Parker     email@hidden <mailto:email@hidden>     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Using floating point instructions
      • From: G 3 <email@hidden>
References: 
 >Using floating point instructions (From: G 3 <email@hidden>)

  • Prev by Date: Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS
  • Next by Date: Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS
  • Previous by thread: Re: Using floating point instructions
  • Next by thread: Re: Using floating point instructions
  • Index(es):
    • Date
    • Thread