[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SVC (SWI) for Thumb
On Wed, Aug 14, 2013 at 07:37:44AM -0700, Matt Thomas wrote:
> >> movs r0, #(syscall - 254)/8
> >> lsls r0, r0, #3
> > Shouldn't that be a shift by 8 ?
> No. The add can only take a 3 bit value (hence, the divide by 8)
> >> adds r0, r0, #((syscall - 254) & 7)
Hmmm... I was looking at the 0x3xxx instruction, not the 0x1exx one.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |