• 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: i386 assembler changed in XCode 2.4?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i386 assembler changed in XCode 2.4?


  • Subject: Re: i386 assembler changed in XCode 2.4?
  • From: Eric Albert <email@hidden>
  • Date: Wed, 9 Aug 2006 20:43:37 -0700

On Aug 9, 2006, at 2:42 PM, Michael Stahulak wrote:

I have some i386 assembly code (in a C source file) that works fine with XCode 2.3, but doesn't compile in XCode 2.4:

__asm
{
	mov	ebx, pDouble
	fld	TBYTE Ptr [ebx]
	fstp	QWORD Ptr [ebx]
}

and

__asm
{
	mov	ebx, pDouble
	fld	QWORD Ptr [ebx]
	fstp	TBYTE Ptr [ebx]
}

with XCode 2.4, I get these compile errors:

no such instruction: `fstpll 0(ëx)'

and

no such instruction: `fldll 0(ëx)'

As far as I can see looking at the build transcript, the arguments to gcc-4.0 are the same, the environment variables are essentially the same (different machines, so pathnames are different but equivalent), so the only possibility I can see is that this latest gcc-4.0 has broken this code. I'm clearly not an assembly language authority, and I've had a lot of trouble determining exactly what syntax the gcc-4.0 assembler supports in the first place, so fixing it at this point is leaving me a a loss. Anyone have any ideas?

As part of the work required for x86-64 support, the Intel assembler in Xcode 2.4 was updated to be based on a very recent version of GNU binutils, which in turn meant that a few instruction variants which were previously incorrectly accepted are no longer allowed. Specifically, the QWORD variants above should be emitted as fstpl and fldl, and the TBYTE versions should be fldt and fstpt, if I'm understanding TBYTE correctly.


It sounds like the compiler is emitting the wrong assembly code here. Please file a bug report at <http://bugreport.apple.com/>. This should be pretty simple to fix.

On a somewhat related note, I'm not sure what this assembly code is doing, but it looks like you should be able to do this in C....

-Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >i386 assembler changed in XCode 2.4? (From: Michael Stahulak <email@hidden>)

  • Prev by Date: Re: Xcode 2.4 or 2.3?
  • Next by Date: Segment Overlaps in Apple Frameworks (XCode 2.4)
  • Previous by thread: i386 assembler changed in XCode 2.4?
  • Next by thread: Xcode 2.4 or 2.3?
  • Index(es):
    • Date
    • Thread