[PATCH] Fix sh64 compilation

Segher Boessenkool segher@kernel.crashing.org
Sat Sep 8 14:08:00 GMT 2007

__SHMEDIA__ is defined to 0 or 1, so #ifdef isn't the right thing to use
here.  There seem to be more occurences of this and similar problems in
this file, but I don't know how to regression check this, so I left those
alone.  This minimal patch is needed to build the compiler.

OK to apply?


2007-08-24  Segher Boessenkool <segher@kernel.crashing.org>

	* config/sh/lib1funcs.asm (sdivsi3): Use #if __SHMEDIA__, not
	#ifdef __SHMEDIA__.

 gcc/config/sh/lib1funcs.asm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gcc/config/sh/lib1funcs.asm b/gcc/config/sh/lib1funcs.asm
index f90374c..ead0b08 100644
--- a/gcc/config/sh/lib1funcs.asm
+++ b/gcc/config/sh/lib1funcs.asm
@@ -3024,7 +3024,7 @@ GLOBAL(GCC_pop_shmedia_regs_nofpu):
 #ifdef L_div_table
 #if __SH5__
-#if defined(__pic__) && defined(__SHMEDIA__)
+#if defined(__pic__) && __SHMEDIA__
 	.global	GLOBAL(sdivsi3)
 #if __SH5__ == 32

More information about the Gcc-patches mailing list