Commit aa268ea622a1e0443ee816c0eb09da928efef5eb

Authored by pbrook
1 parent 4ce6f8de

Thumb shifter carry flag fixes.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3083 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 2 deletions
target-arm/op.c
... ... @@ -819,7 +819,7 @@ void OPPROTO op_shll_T0_im_thumb(void)
819 819 int shift;
820 820 shift = PARAM1;
821 821 if (shift != 0) {
822   - env->CF = (T1 >> (32 - shift)) & 1;
  822 + env->CF = (T0 >> (32 - shift)) & 1;
823 823 T0 = T0 << shift;
824 824 }
825 825 env->NZF = T0;
... ... @@ -832,7 +832,7 @@ void OPPROTO op_shrl_T0_im_thumb(void)
832 832  
833 833 shift = PARAM1;
834 834 if (shift == 0) {
835   - env->CF = ((uint32_t)shift) >> 31;
  835 + env->CF = ((uint32_t)T0) >> 31;
836 836 T0 = 0;
837 837 } else {
838 838 env->CF = (T0 >> (shift - 1)) & 1;
... ...