This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Generated unique labels


On Fri, Jan 03, 2003 at 12:27:49PM -0000, Jonah wrote:
> I am a bit confused by where this conversation is going. Isn't the Projects
> list item referring to having labels in inline assembler. I will give you
> the problem I was having which I thought was the same problem as the
> projects file item.
> 
> int simple_func (int b, int c)
> {
>     int x;
> asm (
> "simple_func_loop_start:\n\t"
> "    Do Assebly Stuff    \n\t"
> "    LOOP to simple_func_loop_start"
> : [x] "=r" (x)
> : [b] "r" (b), [c] "r" (c)
> : "r0", "r1", "memory" );

Written using assembler local labels as

	"0:\n"
	"	Do Assembly Stuff\n"
	"	LOOP 0b"


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]