• 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: Statement-level assembler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Statement-level assembler


  • Subject: Re: Statement-level assembler
  • From: Robert Purves <email@hidden>
  • Date: Wed, 11 Feb 2004 17:06:20 +1300

Stan Shebs wrote:

Statement-level assembler blocks show a curious anomaly in that a newline is apparently required after the opening brace (in Xcode 1.1). If it is omitted, a notably unhelpful error message results. Does this behaviour have a rational explanation, or is it a bug?

    asm { mr r3, sp }  // error: parse error before "r3"

    asm {
        mr r3, sp }   // OK

Um, a bug I think, at least if it works in CW. Asm statements require special newline
handling (because newlines are required in asm, but not in C), I could easily have
gotten this wrong.

Yes, it does work in CW without the redundant newline.

If CW compatibility is an issue, then here's an example that (a) works in CW but not in Xcode, owing to case-sensitivity, and (b) gives a really obscure and hard-to-find build error.

volatile UInt32 GetSP( )
{
register UInt32 dest;
asm
{
mr dest, sp // OK
}
asm
{
mr dest, SP // {standard input}:87:Parameter syntax error (parameter 2)
}
return dest;
}



Robert P. _______________________________________________ xcode-users mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users Do not post admin requests to the list. They will be ignored.

References: 
 >Statement-level assembler (From: Robert Purves <email@hidden>)
 >Re: Statement-level assembler (From: Stan Shebs <email@hidden>)

  • Prev by Date: Re: Linking to a bundle?
  • Next by Date: Re: Mac OS X Deployment Target setting
  • Previous by thread: Re: Statement-level assembler
  • Next by thread: Packaging Issues...
  • Index(es):
    • Date
    • Thread