public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] hppa: Add assember CFI directives to millicode division and remainder routines
@ 2023-04-05 14:52 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2023-04-05 14:52 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]

Committed to trunk after testing on hppa-unknown-linux-gnu.

Dave
---

Add assember CFI directives to millicode division and remainder routines.

The millicode division and remainder routines trap division by zero.
The unwinder needs these directives to unwind divide by zero traps.

2023-04-05  John David Anglin  <danglin@gcc.gnu.org>

libgcc/ChangeLog:

	PR target/109374
	* config/pa/milli64.S (RETURN_COLUMN): Define.
	($$divI): Add CFI directives.
	($$divU): Likewise.
	($$remI): Likewise.
	($$remU): Likewise.

diff --git a/libgcc/config/pa/milli64.S b/libgcc/config/pa/milli64.S
index 2316f797354..e1c84f48d25 100644
--- a/libgcc/config/pa/milli64.S
+++ b/libgcc/config/pa/milli64.S
@@ -105,8 +105,10 @@ sar:	.reg	%cr11	/* Shift Amount Register */
 rp:	.reg    r2	/* return pointer */
 #ifdef pa64
 mrp:	.reg	r2 	/* millicode return pointer */
+#define RETURN_COLUMN	2
 #else
 mrp:	.reg	r31	/* millicode return pointer */
+#define RETURN_COLUMN	31
 #endif
 ret0:	.reg    r28	/* return value */
 ret1:	.reg    r29	/* return value (high part of double) */
@@ -313,6 +315,8 @@ RDEFINE(temp1,arg0)
 	.import $$divI_15,millicode
 	.export $$divI,millicode
 	.export	$$divoI,millicode
+	.cfi_startproc
+	.cfi_return_column RETURN_COLUMN
 	.proc
 	.callinfo	millicode
 	.entry
@@ -484,6 +488,7 @@ LSYM(negative1)
 	addo	arg0,arg1,r0	/*  trap iff dividend==0x80000000 && divisor==-1 */
 	.exit
 	.procend
+	.cfi_endproc
 	.end
 #endif
 
@@ -543,6 +548,8 @@ RDEFINE(temp1,arg0)
 	.import $$divU_12,millicode
 	.import $$divU_14,millicode
 	.import $$divU_15,millicode
+	.cfi_startproc
+	.cfi_return_column RETURN_COLUMN
 	.proc
 	.callinfo	millicode
 	.entry
@@ -706,6 +713,7 @@ LSYM(big_divisor)
 	addc	r0,r0,retreg
 	.exit
 	.procend
+	.cfi_endproc
 	.end
 #endif
 
@@ -750,6 +758,8 @@ RDEFINE(retreg,ret1)
 
 	SUBSPA_MILLI
 	ATTR_MILLI
+	.cfi_startproc
+	.cfi_return_column RETURN_COLUMN
 	.proc
 	.callinfo millicode
 	.entry
@@ -875,6 +885,7 @@ LSYM(finish)
 	nop
 	.exit
 	.procend
+	.cfi_endproc
 #ifdef milliext
 	.origin 0x00000200
 #endif
@@ -922,6 +933,8 @@ RDEFINE(rmndr,ret1)	/*  r29 */
 	SUBSPA_MILLI
 	ATTR_MILLI
 	.export $$remU,millicode
+	.cfi_startproc
+	.cfi_return_column RETURN_COLUMN
 	.proc
 	.callinfo	millicode
 	.entry
@@ -1013,6 +1026,7 @@ LSYM(special_case)
 	nop
 	.exit
 	.procend
+	.cfi_endproc
 	.end
 #endif
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-05 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 14:52 [committed] hppa: Add assember CFI directives to millicode division and remainder routines John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).