.exit

[email protected] (ITOH Yasufumi)
Newsgroups gmane.os.netbsd.ports.hp700
Message-ID <[email protected]>
  Hello,

From HP assembler manual(*1),
the .entry directive marks the firstly executed instruction, and
the .exit directive marks the lastly executed instruction of a procedure.
*1 http://www.hp.com/workstations/support/archive/manuals/A2615-90602.pdf

That is, for example,

	; int add(a, b) { return a + b; }
	add	.proc
		.entry
		bv	%r0(%rp)
		.exit
		add	%arg0,%arg1,%ret0	; delay slot
		.procend

	; void foo() { }
	foo	.proc
		.entry
		.exit
		bv,n	%r0(%rp)
		.procend

However, our in-tree code looks like this:

		.proc
		.entry
		<procedure contents>
		.exit
		.procend

(note the .exit is placed after the procedure contents)
and gcc also emits assembly code like this.

Which is correct?
-- 
ITOH Yasufumi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.