Subject: Re: How about Not prepending underscores to variable names?
To: Jonathan Stone , Adam Glass <glass@NetBSD.ORG>
From: Andrew Cagney <cagney@highland.com.au>
List: port-pmax
Date: 09/16/1994 16:09:56
Hi,

To extend the discussion a little.  Two related labels are often involved.

What prefixes does MIPS use when generating code like the below?  
(Typical of many several load/store processors).  While pure A.OUT won't
normally use it, it may be useful to compare.

	; Table of Contents containing 32bit constants
	TOC:
	. . .
	.cfun:	; contains cfun() address
		.word	cfun

	; Function code ...
	cfunc:	; c-func code ....

	. . .

	; call of cfun (one of many ways)
		move  .cfun-TOC(toc_pointer), r0
		jump r0
		. . .

Notice the use of:

	.cfun
		For the local address of the 32bit cfun constant
	cfun
		For the address of the real code

What does MIPS use?  And would the `a.out' naming be:

	_cfun
		The real machine code
	Lcfun
		Local label for addr containing the cfun absolute address

					comments? Andrew