annotate python/target/arm.brg @ 322:44f336460c2a

Half of use of burg spec for arm
author Windel Bouwman
date Mon, 27 Jan 2014 19:58:07 +0100
parents
children e9fe6988497c
rev   line source
322
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
1
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
2 from target.arminstructions import Orr, Lsl, Str2, Ldr2, Ldr3
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
3 from target.arminstructions import B, Bl, Bgt, Blt, Beq, Bne
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
4 from target.arminstructions import Mov2, Mov3
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
5 from target.arminstructions import Add, Sub, Cmp, Sub2, Add2, Mul
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
6
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
7 %%
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
8
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
9 %terminal ADDI32 SUBI32 ORI32 SHLI32
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
10 %terminal CONSTI32 MEMI32 REGI32 CALL
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
11
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
12 %%
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
13
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
14 reg: ADDI32(reg, reg) 2 (. d = self.newTmp(); self.emit(Add, dst=[d], src=[$1, $2]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
15 reg: SUBI32(reg, reg) 2 (. d = self.newTmp(); self.emit(Sub, dst=[d], src=[$1, $2]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
16 reg: ORI32(reg, reg) 2 (. d = self.newTmp(); self.emit(Orr, dst=[d], src=[$1, $2]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
17 reg: SHLI32(reg, reg) 2 (. d = self.newTmp(); self.emit(Lsl, dst=[d], src=[$1, $2]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
18 reg: MULI32(reg, reg) 2 (. d = self.newTmp(); self.emit(Mul, dst=[d], src=[$1, $2]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
19
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
20 reg: CONSTI32 3 (. d = self.newTmp(); self.emit(Sub, dst=[d], src=[$$.value]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
21 reg: MEMI32(reg) 4 (. d = self.newTmp(); self.emit(Ldr2, dst=[d], src=[$1]); return d .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
22 reg: REGI32 1 (. pass .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
23 reg: CALL 1 (. pass .)
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
24
44f336460c2a Half of use of burg spec for arm
Windel Bouwman
parents:
diff changeset
25