Date: Thu, 24 Feb 2000 12:29:22 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Rossz Vámos-Wentworth cc: djgpp AT delorie DOT com Subject: Re: More on building a cross compiler - help needed In-Reply-To: <38b36b83_2@news.jps.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id FAA19486 Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 22 Feb 2000, Rossz Vámos-Wentworth wrote: > #ifdef L_floatdidf > #define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT) > #define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2)) > #define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE) > > DFtype > __floatdidf (DItype u) > { > DFtype d; > > d = (SItype) (u >> WORD_SIZE); // line 995 > d *= HIGH_HALFWORD_COEFF; > d *= HIGH_HALFWORD_COEFF; > d += (USItype) (u & (HIGH_WORD_COEFF - 1)); // line 998 > > return d; > } > #endif > code ends --------------------------------------------- > > Output here: > > _floatdidf > ./libgcc2.c: In function `__floatdidf': > ./libgcc2.c:995: warning: right shift count >= width of type > ./libgcc2.c:998: warning: left shift count >= width of type Are you sure the last warning was about a left shift, not a right shift? I don't see any left shift on line 998. Anyway, I think that these warnings are harmless in this case. > > > Since they are only warning errors and I don't care about > > > the runtime libraries, I didn't worry. > > > > How so? libgcc.a is an essential part of the compiler, you might be > > unable to produce executables that can be run on the target without > > libgcc. > > I have my own runtime libraries. None of the original GNU libraries can be > used, anyway (it's an embedded system). libgcc is also used for some instructions that the target processor lacks, like long long support. Do you have your own libraries for this as well? > > Add -save-temps to the compiler switches and examine the *.ii files it > > leaves behind. You will then see what does cc1 see on that line. > > All it displayed was the name of the file being compiled. The -save-temps switch doesn't display anything, it prevents the compiler from deleting the temporary files created by the compiler passes. Those files are left behind in your temporary-file directory (the one pointed by the TMPDIR variable), so you should look for them there.