This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: rv64: bug in encoding of bge?



On 10/01/2019 08:02, Paulo Matos wrote:
> Of course, I was totally confused because the dump shows
>  bge     a2,a1,0
> and my eyes were glossing over the <foo> at the end of each line.
> Therefore I expected that all instructions should be looping to themselves.
> 
> But the original code has them all looping back to foo.
> 
> Got it, thanks.

In order to confirm my suspicion, the bge (and other branches) take an
address as the third argument, the assemble then subtracts the PC from
it and puts the result into the offset field of the instruction. Is this
correct?

Kind regards,

-- 
Paulo Matos


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