This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Can hex numbers appear as a const_int in md files?


I was trying to figure out how to fix a warning stemming from
m88k.md and i860.md referring to -2147483648 (INT_MIN)

insn-recog.c: In function `recog_2':
insn-recog.c:1929: warning: integer constant is unsigned in ISO C, signed with -traditional
insn-recog.c:1929: warning: decimal constant is so large that it is unsigned

So I tried changing the constant to 0x80000000 but the resulting code
in insn-recog.c showed a zero.  I'm pretty sure this is because the
hex number is being passed to atoi/atol in read-rtx.c.

However, I notice in several places that hex numbers are used in this
same context in other md files.  So what's up?  Are these below all
bugs?

		--Kaveh



 > grep -n 'const_int.*0x' config/*/*.md
 > config/1750a/1750a.md:812:                 (lshiftrt:QI (const_int 0x8000)
 > config/1750a/1750a.md:821:            (not:QI (lshiftrt:QI (const_int 0x8000)
 > config/cris/cris.md:887:;;              (const_int 1 [0x1]))) 4 {cmpdi} (nil)
 > config/cris/cris.md:900:;;                        (const_int -84 [0xffffffac])) 0) 0)) -1 (nil)
 > config/i386/i386.md:19679:               (parallel [(const_int 0x8000)
 > config/i386/i386.md:19680:                          (const_int 0x8000)
 > config/i386/i386.md:19681:                          (const_int 0x8000)
 > config/i386/i386.md:19682:                          (const_int 0x8000)])))

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]