summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-01-20 15:38:38 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-01-20 15:38:38 +0000
commit2ebd6b4bc678a8426ec40ce5ff5587fb63249df2 (patch)
tree3b711aa238c7aab3924579ef587e0ed603980dc2
parent4f6c8f770f39bac1ef46b0b7bb92496e6935ab89 (diff)
downloadfpc-2ebd6b4bc678a8426ec40ce5ff5587fb63249df2.tar.gz
* refactored Bl2B condition code to make it more readable
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23464 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/arm/aoptcpu.pas18
1 files changed, 5 insertions, 13 deletions
diff --git a/compiler/arm/aoptcpu.pas b/compiler/arm/aoptcpu.pas
index 180994e157..5c03b85645 100644
--- a/compiler/arm/aoptcpu.pas
+++ b/compiler/arm/aoptcpu.pas
@@ -1600,27 +1600,19 @@ Implementation
MatchInstruction(hp1, A_SUB, [C_None], [PF_NONE]) and
(taicpu(hp1).oper[0]^.typ = top_reg) and
(taicpu(hp1).oper[0]^.reg = NR_STACK_POINTER_REG) and
- (taicpu(hp1).oper[1]^.typ = top_reg) and
- (taicpu(hp1).oper[1]^.reg = NR_STACK_POINTER_REG) and
+ MatchOperand(taicpu(hp1).oper[0]^,taicpu(hp1).oper[1]^) and
(taicpu(hp1).oper[2]^.typ = top_const) and
MatchInstruction(hp3, A_ADD, [C_None], [PF_NONE]) and
- (taicpu(hp3).oper[0]^.typ = top_reg) and
- (taicpu(hp3).oper[0]^.reg = NR_STACK_POINTER_REG) and
- (taicpu(hp3).oper[1]^.typ = top_reg) and
- (taicpu(hp3).oper[1]^.reg = NR_STACK_POINTER_REG) and
- (taicpu(hp3).oper[2]^.typ = top_const) and
- (taicpu(hp1).oper[2]^.val = taicpu(hp3).oper[2]^.val) and
+ MatchOperand(taicpu(hp1).oper[0]^,taicpu(hp3).oper[0]^) and
+ MatchOperand(taicpu(hp1).oper[0]^,taicpu(hp3).oper[1]^) and
+ MatchOperand(taicpu(hp1).oper[2]^,taicpu(hp3).oper[2]^) and
MatchInstruction(hp2, [A_BL,A_BLX], [C_None], [PF_NONE]) and
(taicpu(hp2).oper[0]^.typ = top_ref) and
MatchInstruction(hp4, A_LDM, [C_None], [PF_FD]) and
- (taicpu(hp4).oper[0]^.typ = top_ref) and
- (taicpu(hp4).oper[0]^.ref^.index=NR_STACK_POINTER_REG) and
- (taicpu(hp4).oper[0]^.ref^.base=NR_NO) and
- (taicpu(hp4).oper[0]^.ref^.offset=0) and
- (taicpu(hp4).oper[0]^.ref^.addressmode=AM_PREINDEXED) and
+ MatchOperand(taicpu(p).oper[0]^,taicpu(hp4).oper[0]^) and
(taicpu(hp4).oper[1]^.typ = top_regset) and
(taicpu(hp4).oper[1]^.regset^ = [RS_R15]) then
begin