This is the mail archive of the
mailing list for the GCC project.
Re: Regarding x86 'sete' instruction and its corresponding RTL
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Niranjan Hasabnis <nirhasabnis at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 04 Apr 2014 19:18:10 +0200
- Subject: Re: Regarding x86 'sete' instruction and its corresponding RTL
- Authentication-results: sourceware.org; auth=none
- References: <CAD2ATQRsN7=4RKrHo6dCwS=a3jR0mJdTRkmqz6eOx9gJu8Yhrg at mail dot gmail dot com> <6603339 dot s6LlQ551EI at polaris> <CAD2ATQQmo1guKk8SiBJq6CPFBy9pGxOU7i+na8L4nwhQUfy8Og at mail dot gmail dot com>
> Thank you for your reply. I referred to section 13.10, and the description
> there does not precisely specify the result of comparison with CC register.
Quoting section 13.10:
"There are two ways that comparison operations may be used. The
comparison operators may be used to compare the condition codes `(cc0)'
against zero, as in `(eq (cc0) (const_int 0))'. Such a construct
actually refers to the result of the preceding instruction in which the
condition codes were set.
In the example above, if `(cc0)' were last set to `(compare X Y)', the
comparison operation is identical to `(eq X Y)'. Usually only one style
of comparisons is supported on a particular machine, but the combine
pass will try to merge the operations to produce the `eq' shown in case
it exists in the context of the particular insn involved."