inline __isctype no longer available for C++ programs
Ryan S. Arnold
ryan.arnold@gmail.com
Thu Aug 8 16:30:00 GMT 2013
On Thu, Aug 8, 2013 at 11:17 AM, Ryan S. Arnold <ryan.arnold@gmail.com> wrote:
> On Thu, Aug 8, 2013 at 11:02 AM, Andreas Schwab <schwab@suse.de> wrote:
>> Ryan S Arnold <rsa@linux.vnet.ibm.com> writes:
>>
>>> int is = __isctype('a',_ISupper | _ISalpha);
>>>
>>> rather than:
>>>
>>> int is = isupper(a) | isalpha(a);
>>
>> The compiler should be able to optimize the latter into the former.
>
> Good point. I'll check the disassembled object files to see if it
> does indeed do this. If it does there wouldn't really be a need for
> an inlined isctype function.
>
> I imagine this might be complicated by the fact that __isctype_f hides
> references into specification tables, are queried from thread specific
> data.
The GCC compiler does indeed optimize isupper(a) | isalpha(a) to same
instructions seqence as __isctype('a'|_ISupper | _ISalpha).
I think what we have is satisfactory.
Thanks Andreas.
Ryan.
More information about the Libc-alpha
mailing list