diff mbox series

sparc: define SPARC_LONG_DOUBLE_TYPE_SIZE for vxworks [PR115739]

Message ID 528fb3a3-6973-528e-167b-4ad65224c177@linux.ibm.com
State New
Headers show
Series sparc: define SPARC_LONG_DOUBLE_TYPE_SIZE for vxworks [PR115739] | expand

Commit Message

Kewen.Lin July 2, 2024, 3:24 a.m. UTC
Hi,

Commit r15-1594 removed define of LONG_DOUBLE_TYPE_SIZE in
sparc.cc, it's based on the assumption that each OS has its
own define (see the comments in sparc.h), but it exposes an
issue on vxworks which lacks of the define.

We can bring back the default SPARC_LONG_DOUBLE_TYPE_SIZE to
sparc.cc, but according to the comments in sparc.h, I think
it's better to define this in vxworks.h.  btw, I also went
through all the sparc supported triples, vxworks is the only
one that misses this define.

Built well with cross build --target=sparc-wrs-vxworks,
is it ok for trunk?

BR,
Kewen
-----

	PR target/115739

gcc/ChangeLog:

	* config/sparc/vxworks.h (SPARC_LONG_DOUBLE_TYPE_SIZE): New define.
---
 gcc/config/sparc/vxworks.h | 4 ++++
 1 file changed, 4 insertions(+)

--
2.43.0

Comments

Eric Botcazou July 2, 2024, 8:54 a.m. UTC | #1
> 	PR target/115739
> 
> gcc/ChangeLog:
> 
> 	* config/sparc/vxworks.h (SPARC_LONG_DOUBLE_TYPE_SIZE): New define.

OK, thanks!
diff mbox series

Patch

diff --git a/gcc/config/sparc/vxworks.h b/gcc/config/sparc/vxworks.h
index c1a9310fb3f..4cdb3b1685d 100644
--- a/gcc/config/sparc/vxworks.h
+++ b/gcc/config/sparc/vxworks.h
@@ -62,3 +62,7 @@  along with GCC; see the file COPYING3.  If not see
 /* This platform supports the probing method of stack checking (RTP mode).
    8K is reserved in the stack to propagate exceptions in case of overflow.  */
 #define STACK_CHECK_PROTECT 8192
+
+/* SPARC_LONG_DOUBLE_TYPE_SIZE should be defined per OS.  */
+#undef SPARC_LONG_DOUBLE_TYPE_SIZE
+#define SPARC_LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)