From e45b6c6e8431177b5b7702cabef0edb17265d36c Mon Sep 17 00:00:00 2001 From: rth Date: Wed, 12 Apr 2000 07:57:37 +0000 Subject: [PATCH] Stephen L Moshier * real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Comment. * real.c (toe64): Revert previous change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33097 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/real.c | 10 +++++++--- gcc/real.h | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 595d54aa99d..3888e780155 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-04-12 Stephen L Moshier + + * real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Comment. + * real.c (toe64): Revert previous change. + 2000-04-12 Jakub Jelinek * objc/objc-act.c: Include ggc.h. diff --git a/gcc/real.c b/gcc/real.c index f26635b89de..b8a59b391b0 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -3646,9 +3646,13 @@ toe64 (a, b) else { q = b + 4; /* point to output exponent */ -#if MAX_LONG_DOUBLE_TYPE_SIZE == 96 - /* Clear the last two bytes of 12-byte Intel format */ - *(q+1) = 0; + /* The purpose of this conditional is to avoid scribbling beyond + the end of a long double, in case the type is only 80 bits wide. */ + if (LONG_DOUBLE_TYPE_SIZE == 96) + { + /* Clear the last two bytes of 12-byte Intel format */ + *(q+1) = 0; + } #endif } #endif diff --git a/gcc/real.h b/gcc/real.h index 3aba2e245d4..a85ca741120 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -68,6 +68,11 @@ Boston, MA 02111-1307, USA. */ #ifndef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 64 #endif +/* MAX_LONG_DOUBLE_TYPE_SIZE is a constant tested by #if. + LONG_DOUBLE_TYPE_SIZE can vary at compiler run time. + So long as macros like REAL_VALUE_TO_TARGET_LONG_DOUBLE cannot + vary too, however, then XFmode and TFmode long double + cannot both be supported at the same time. */ #ifndef MAX_LONG_DOUBLE_TYPE_SIZE #define MAX_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE #endif -- 2.11.0