This is the mail archive of the gcc-patches@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]

Re: [patch 2/2] AMD bdver2 processors - TBM


On Thu, Nov 4, 2010 at 11:19 AM, Richard Henderson <rth@redhat.com> wrote:
>> + ?;; For TBM support
>> + ?UNSPEC_BEXTRI
>
> Leftover.
>
>> +(define_insn "*tbm_blci_<mode>"
>> + ?[(set (match_operand:SWI48 0 "register_operand" "=r")
>> + ? ? ? ?(ior:SWI48
>> + ? ? ? ? ? ? ? (not:SWI48
>> + ? ? ? ? ? ?(plus:SWI48
>> + ? ? ? ? ? ? ?(match_operand:SWI48 1 "nonimmediate_operand" "rm")
>> + ? ? ? ? ? ? ?(const_int 1)))
>> + ? ? ? ? ?(match_dup 1)))
>
> Alignment.
>
>> + ?[(set_attr "type" "bitmanip")
>> + ? (set_attr "mode" "<MODE>")])
>> +
>> +
>> +
>
> Watch the extra vertical whitespace.
>
>> +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>> +__bextri_u32 (unsigned int __X, const unsigned int __I)
>> +{
>> + ? ? unsigned char length ? ?= ((__I >> 8) & 0xFF);
>> + ? ? unsigned char lsb_index = (__I & 0xFF);
>> + ? ? return __builtin_ia32_bextri_u32 (__X, length, lsb_index);
>
> If you hadn't created the bextri builtin with three arguments,
> you wouldn't have to play the tricks you're doing here to make
> sure that the final arguments are constants.
>
> Unless you want to expose both constants to the user intrinsic
> (which isn't a horrible idea if you are not already constrained
> by external documentation of these), there's no reason you can't
> pull apart the two bytes of the immediate inside the builtin
> expander instead.
>
>> +@smallexample
>> +unsigned int __builtin_ia32_bextri_u32 (unsigned int, const unsigned int);
>> +unsigned long long __builtin_ia32_bextri_u64 (unsigned long long, const unsigned long long);
>> +@end smallexample
>
> ... and you documentation wasn't updated to match. ?Though if you
> are going to change it back...
>
>
> r~
>

With fixes from Richard's feedback.

Passes bootstrap and make -k check for i386.exp in x86-64.

Okay to commit?
-- 
Quentin

Attachment: 0002-2010-11-07-TBM-Quentin-Neill-quentin.neill.gnu-gmail.com.patch.txt
Description: Text document


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