m68k: minor bits, addq/subq works also on address regs, remove reference validity check in a_op_const_ref because we have fixref() later anyway

git-svn-id: trunk@27876 -
This commit is contained in:
Károly Balogh 2014-06-06 15:15:03 +00:00
parent 34394d6925
commit 381cf72023

View File

@ -1101,7 +1101,7 @@ unit cgcpu;
OP_SUB: OP_SUB:
begin begin
{ add/sub works the same way, so have it unified here } { add/sub works the same way, so have it unified here }
if (a >= 1) and (a <= 8) and not isaddressregister(reg) then if (a >= 1) and (a <= 8) then
if (op = OP_ADD) then if (op = OP_ADD) then
opcode:=A_ADDQ opcode:=A_ADDQ
else else
@ -1201,8 +1201,7 @@ unit cgcpu;
opsize := TCGSize2OpSize[size]; opsize := TCGSize2OpSize[size];
{ on ColdFire all arithmetic operations are only possible on 32bit } { on ColdFire all arithmetic operations are only possible on 32bit }
if not isvalidreference(ref) or if ((current_settings.cputype in cpu_coldfire) and (opsize <> S_L)
((current_settings.cputype in cpu_coldfire) and (opsize <> S_L)
and not (op in [OP_NONE,OP_MOVE])) then and not (op in [OP_NONE,OP_MOVE])) then
begin begin
inherited; inherited;