Re: left and right bit shift assembly operators
Alec McKenzie <[email protected]>
| Newsgroups | gmane.os.opendarwin.general |
|---|---|
| Message-ID | <p0611040abd9941976407@[81.187.217.98]> |
At 9:51 +0100 on 18/10/04, Sam Hart wrote: >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. The two values may not be established yet (because they are relocatable), but the difference between them is constant, because the two values have the same relocation factor. The shift operation is to be performed on this constant difference, which is an absolute value. There should be no problem with that. The problem lies in the assembler, not the code. -- Alec McKenzie [email protected]