Skip to content

Commit e562453

Browse files
committed
remove unnecessary bit clearing.
1 parent 8b0b719 commit e562453

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Diff for: x80.cxx

-9
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,6 @@ void z80_op_rlc( uint8_t * pval )
538538
reg.fCarry = bit7;
539539
if ( bit7 )
540540
x |= 1;
541-
else
542-
x &= 0xfe;
543541
set_sign_zero_parity( x );
544542
reg.fAuxCarry = false;
545543
reg.fWasSubtract = false;
@@ -556,8 +554,6 @@ void z80_op_rl( uint8_t * pval )
556554
x <<= 1;
557555
if ( reg.fCarry )
558556
x |= 1;
559-
else
560-
x &= 0xfe;
561557
reg.fCarry = bit7;
562558
set_sign_zero_parity( x );
563559
reg.fAuxCarry = false;
@@ -576,8 +572,6 @@ void z80_op_rrc( uint8_t * pval )
576572
reg.fCarry = bit0;
577573
if ( bit0 )
578574
x |= 0x80;
579-
else
580-
x &= 0x7f;
581575
set_sign_zero_parity( x );
582576
reg.fAuxCarry = false;
583577
reg.fWasSubtract = false;
@@ -594,8 +588,6 @@ void z80_op_rr( uint8_t * pval )
594588
x >>= 1;
595589
if ( reg.fCarry )
596590
x |= 0x80;
597-
else
598-
x &= 0x7f;
599591
reg.fCarry = bit0;
600592
set_sign_zero_parity( x );
601593
reg.fAuxCarry = false;
@@ -708,7 +700,6 @@ void z80_op_srl( uint8_t * pval )
708700
uint8_t val = *pval;
709701
reg.fCarry = ( val & 1 );
710702
val >>= 1;
711-
val &= 0x7f;
712703
set_sign_zero_parity( val );
713704
reg.clearHN();
714705
reg.z80_assignYX( val );

0 commit comments

Comments
 (0)