• 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
inline assembly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inline assembly


  • Subject: inline assembly
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 24 Feb 2004 15:15:34 -0800

How do I call a stub function **** within my ObjC inline assembly block? I've scoured online docs, and found the jbsr macro, but I can't figure out how to implement it. Also, I would actually like to mtlr 1: and jmp instead of the bl and subsequent b, if that's feasible. How? (PPCasm-newbie Q's)...

	asm volatile (
		"1:	li      	%[c], 1\n"
		"2:	lwarx   	%[s], 0, %[p]\n"
		"	cmpwi   	%[s], 0\n"
		"	beq+    	3f\n"
		"	jbsr 	****,****\n" // sched_yield();
		"	b		1b\n"
		"3:	stwcx.  	%[c], 0, %[p]\n"
		"	bne-    	2b\n"
		" 	isync	\n"
		: [c] "=&r" (c), [s] "=&r" (s)
		: [p] "r" (p)
		: "cc" );

TIA for help.  ;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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.


  • Follow-Ups:
    • Re: inline assembly
      • From: Andrew Pinski <email@hidden>
  • Prev by Date: Re: Subversion and Interface Builder
  • Next by Date: Re: Subversion and Interface Builder
  • Previous by thread: Re: Subversion and Interface Builder
  • Next by thread: Re: inline assembly
  • Index(es):
    • Date
    • Thread