• 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
Codewarrior inline asm to xcode asm roadblock!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Codewarrior inline asm to xcode asm roadblock!


  • Subject: Codewarrior inline asm to xcode asm roadblock!
  • From: "Ando Sonenblick" <email@hidden>
  • Date: Wed, 10 Aug 2005 14:56:59 -0700
  • Thread-topic: Codewarrior inline asm to xcode asm roadblock!

Gang,

I'm porting a bunch of CW code to Xcode and am having some specific
difficulties with asm conversion (yes CW style inlining is on).     I'm
no expert at PowerPC asm so I thought I'd ask others who may know more
or might have been down this same path before.

The problem that I'm stuck on now is this:

void foo()
{
	register short *iclp;
	register int   x1;

...

	lwz   x1,iclp

...

}

Codwarrior compiles that code just fine, but Xcode complains.  And try
as I might, I cannot figure out how I need to change the line to get it
to work.

I figure that the line is doing the equivalent of this C code:

x1 = *(int *)iclp;

Is my assumption correct?  If so, I instead tried:


	lwz   x1,0(iclp)


But that just caused the function foo() to crash.  I also commented out
the lwz, stepped out of inline asm,  added that very line of C, then
resumed the asm code:


void foo()
{
	register short *iclp;
	register int   x1;

asm {
    ...
    }

    x1 = *(int *)iclp;

asm {
    ...
    }
}

But that too just ended with foo() crashing.

So can anyone tell me what I can do here?   I've tried a billion and
four things and am totally stuck!!!!

Thx,
Ando


 _______________________________________________
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

  • Prev by Date: Re: reducing ld's memory footprint (19 minutes of linking)
  • Next by Date: Re: Changing the Cross-dev SDK for just one target?
  • Previous by thread: Re: Changing the Cross-dev SDK for just one target?
  • Next by thread: Trying to build a static library using X-Code 1.5
  • Index(es):
    • Date
    • Thread