Subject: .exit
To: None <port-hp700@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: port-hp700
Date: 06/09/2002 21:44:06
  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