[PATCH V8 06/10] powerpc, lib: Add new branch analysis support functions
Anshuman Khandual
khandual at linux.vnet.ibm.com
Wed Jun 10 22:10:08 AEST 2015
On 06/10/2015 11:03 AM, Daniel Axtens wrote:
>
>> +static int instr_is_branch_xlform(unsigned int instr)
>> +{
>> + return branch_opcode(instr) == 19;
>> +}
> Why do these not return bool? The functions below do.
Yeah they can, will change it.
>> +
>> +bool instr_is_indirect_func_call(unsigned int instr)
>> +{
>> + /* XL-form instruction with LR set */
>> + if (instr_is_branch_xlform(instr) && is_branch_link_set(instr))
>> + return true;
>> +
>> + return false;
>> +}
> Both of these functions could be made into a single 'return' statement,
> right?
Yeah, right.
More information about the Linuxppc-dev
mailing list