This is the mail archive of the mailing list for the GDB 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] arm reversible : <phase_2_complete>

Hi Yao,

the function sbo_sbz is generic function, which checks whether alll
the bits are 1 or all are 0 ?
the position of starting bit could be anything and ending bit could be anything.
this function accepts any position (between 0-31) and any length.

I looked at the functions which you suggested;
they seem to be working on specific insns.

I could not find a better way other than ANDing all the bits to find
out whether they all are 1 or 0.

I could be easily wrong here or still might not be getting the angle
which you are trying to bring in.


On Tue, Nov 8, 2011 at 3:46 PM, Yao Qi <> wrote:
> On 11/08/2011 02:01 PM, oza Pawandeep wrote:
>> Yao >> This function is used to match opcode for instructions. ÂWhy don't
>> you use bit operation (AND and OR) and logic operation to match
>> instruction? ÂBit operation and logic operation are widely used in
>> gdb. ÂIt is efficient and easy to read. ÂI suggest to replace
>> sbo_sbz by bit/logical operation when matching instruction.
>> Oza >> I am not sure what you meant by re-writting sbo_sbz function.
>> as there is already '&' and '!' and '>>' which all are bit operators.
> I suggested to remove sbo_sbz function, to decode instructions with
> macros bits/bit, and to match using if/else/switch etc.
> Please reference arm_get_next_pc_raw, arm_process_displaced_insn and
> thumb_process_displaced_insn to see how instructions are decoded and
> matched.
> --
> Yao (éå)

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