Ok, the problem is:
assume that some value is in r15.
I need to extract a sign bit of r15 and extend it to whole word and save thes
in r14.
For example:
r15 r14
0x8f01 0xffff
0x7341 0x0000
The first solution is simple:
mov #-1, r14
tst r15
jl .lab
mov #0, r14
.lab:
Another one is:
mov r15, r14
swpb r14
sxt r14
swpb r14
sxt r14
Can anyone invent a simpler solution?
Cheers,
~d
--
/********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314
********************************************************************/