Re: left and right bit shift assembly operators

Sam Hart <[email protected]>
Newsgroups gmane.os.opendarwin.general
Message-ID <[email protected]>
Indira Estacio Moreno wrote:

> I moved the last line after the .text directive and modify its 
> contents to
> .set .L9, (.LA - .) >> 2
> and
> .set .L9, (.LA - . + 3) >> 2
> but the result was the same, the "relocation error, absummed 0" was 
> throwed in this line

The problem is the shift

.set .L9, .LA

works

.set .L9, .LA >> 0

causes the problem you are experiencing

the code wants .L9 to equal the number of 32-bit values between .LA and 
x.L4, plus 9 ( for reasons best known to itself. )

doing this by hand reveals the problem

the assembler does not like the fact that the values of the labels are 
not absolute

that is to say you are performing operations on values which haven't 
been established yet.


S a m

-------------------------------------------------------

Drawing on my fine command of language, I said nothing.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.