• 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: App hangs when displaying any sheet in 10.5 [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App hangs when displaying any sheet in 10.5 [SOLVED]


  • Subject: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 5 Jun 2008 23:15:14 -0700

On 05 Jun 08, at 22:58, Graham Cox wrote:
	call	L_objc_msgSend$stub
	leal	LC17-"L00000000012$pb"(ëx), ìx
	movl	êx, íx
	andl	$65535, íx
	shrl	$16, êx
	cvtsi2ss	êx, %xmm0
	cvtsi2ss	íx, %xmm1
	mulss	(ìx), %xmm0
	addss	%xmm1, %xmm0
	movss	%xmm0, -44(ëp)

This'll take the return value of objc_msgSend (in eax) and convert it to floating-point. The shift/multiply/add bit is a bit strange, but the cvtsi2ss is a clear sign of an integer->float conversion. GCC is assuming that the return value should be interpreted as an integer, then cast to a float.


	call	L_objc_msgSend_fpret$stub
	fstps	-16(ëp)

As the _fpret suggests, this is behaving correctly.

Keep in mind that, in the x86 architecture (along with most other modern architectures), floating-point values are kept in separate registers from other values. As the Mach-O x86 ABI mandates that (non- struct) return values are returned in registers, rather than on the stack, it's therefore crucial that functions which return floating- point values have explicit prototypes.
_______________________________________________


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


References: 
 >Where to start looking to fix hang? (From: Graham Cox <email@hidden>)
 >Re: Where to start looking to fix hang? (From: j o a r <email@hidden>)
 >App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?] (From: Andy Lee <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Brian Stern <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: "Hamish Allan" <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: "Hamish Allan" <email@hidden>)
 >Re: App hangs when displaying any sheet in 10.5 [SOLVED] (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Next by Date: Re: DTrace probe problem
  • Previous by thread: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Next by thread: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Index(es):
    • Date
    • Thread