RFC: PATCH: Require and use int64 for x86 options

2011-07-27 Thread H.J. Lu
On Wed, Jul 13, 2011 at 6:22 AM, Ian Lance Taylor wrote: > Igor Zamyatin writes: > >> As you may see pta_flags enum in i386.c is almost full. So there is a >> risk of overflow in quite near future. Comment in source code advises >> "widen struct pta flags" which is now defined as unsigned. But it

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-27 Thread Uros Bizjak
On Wed, Jul 27, 2011 at 6:42 PM, H.J. Lu wrote: >>> As you may see pta_flags enum in i386.c is almost full. So there is a >>> risk of overflow in quite near future. Comment in source code advises >>> "widen struct pta flags" which is now defined as unsigned. But it >>> looks not optimal. >>> >>>

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-27 Thread H.J. Lu
On Wed, Jul 27, 2011 at 10:00 AM, Uros Bizjak wrote: > On Wed, Jul 27, 2011 at 6:42 PM, H.J. Lu wrote: > As you may see pta_flags enum in i386.c is almost full. So there is a risk of overflow in quite near future. Comment in source code advises "widen struct pta flags" which is now

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-27 Thread Joseph S. Myers
On Wed, 27 Jul 2011, H.J. Lu wrote: > ; Maximum number of mask bits in a variable. > MaxMaskBits > ix86_isa_flags = 64 > > It mark ix86_isa_flags as 64bit. Any comments? The patch won't work as is. set_option, for example, casts a pointer to (int *), and stores a mask that came from option->v

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-27 Thread H.J. Lu
On Wed, Jul 27, 2011 at 2:23 PM, Joseph S. Myers wrote: > On Wed, 27 Jul 2011, H.J. Lu wrote: > >> ; Maximum number of mask bits in a variable. >> MaxMaskBits >> ix86_isa_flags = 64 >> >> It mark ix86_isa_flags as 64bit.  Any comments? > > The patch won't work as is.  set_option, for example, cast

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-28 Thread H.J. Lu
On Wed, Jul 27, 2011 at 2:37 PM, H.J. Lu wrote: > On Wed, Jul 27, 2011 at 2:23 PM, Joseph S. Myers > wrote: >> On Wed, 27 Jul 2011, H.J. Lu wrote: >> >>> ; Maximum number of mask bits in a variable. >>> MaxMaskBits >>> ix86_isa_flags = 64 >>> >>> It mark ix86_isa_flags as 64bit.  Any comments? >>

Re: RFC: PATCH: Require and use int64 for x86 options

2011-07-29 Thread Paolo Bonzini
On 07/27/2011 06:42 PM, H.J. Lu wrote: + if (max == 64) + var_mask_1[var] = "1LL" This must be ((HOST_WIDE_INT)1). Paolo

Re: RFC: PATCH: Require and use int64 for x86 options

2011-08-04 Thread H.J. Lu
On Wed, Jul 27, 2011 at 2:23 PM, Joseph S. Myers wrote: > On Wed, 27 Jul 2011, H.J. Lu wrote: > >> ; Maximum number of mask bits in a variable. >> MaxMaskBits >> ix86_isa_flags = 64 >> >> It mark ix86_isa_flags as 64bit.  Any comments? > > The patch won't work as is.  set_option, for example, cast

Re: RFC: PATCH: Require and use int64 for x86 options

2011-08-04 Thread H.J. Lu
On Thu, Aug 4, 2011 at 11:08 AM, H.J. Lu wrote: > On Wed, Jul 27, 2011 at 2:23 PM, Joseph S. Myers > wrote: >> On Wed, 27 Jul 2011, H.J. Lu wrote: >> >>> ; Maximum number of mask bits in a variable. >>> MaxMaskBits >>> ix86_isa_flags = 64 >>> >>> It mark ix86_isa_flags as 64bit.  Any comments? >>

Re: RFC: PATCH: Require and use int64 for x86 options

2011-08-04 Thread Joseph S. Myers
On Thu, 4 Aug 2011, H.J. Lu wrote: > Here is the updated patch to get proper HOST_WIDE_INT bits and 1 > through a new file, opt-gen.c. OK for trunk? Using another generator program like this can't be the best approach (apart from anything else, when built for the build system hwint.h should re

Re: RFC: PATCH: Require and use int64 for x86 options

2011-08-04 Thread H.J. Lu
On Thu, Aug 4, 2011 at 3:46 PM, Joseph S. Myers wrote: > On Thu, 4 Aug 2011, H.J. Lu wrote: > >> Here is the updated patch to get proper HOST_WIDE_INT bits and 1 >> through a new file, opt-gen.c.  OK for trunk? > > Using another generator program like this can't be the best approach > (apart from

Re: RFC: PATCH: Require and use int64 for x86 options

2011-08-04 Thread H.J. Lu
On Thu, Aug 4, 2011 at 4:44 PM, H.J. Lu wrote: > On Thu, Aug 4, 2011 at 3:46 PM, Joseph S. Myers > wrote: >> On Thu, 4 Aug 2011, H.J. Lu wrote: >> >>> Here is the updated patch to get proper HOST_WIDE_INT bits and 1 >>> through a new file, opt-gen.c.  OK for trunk? >> >> Using another generator