summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaksen <laksen@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-12-27 16:00:06 +0000
committerlaksen <laksen@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-12-27 16:00:06 +0000
commitcddcb1242e32453211d037359a6a3460159299e4 (patch)
treeba76ce57fefa3ebbb78797f2bc0d095914dd146b
parent394e93a342f3419fa48d6851002e2db0c0e4b43f (diff)
downloadfpc-cddcb1242e32453211d037359a6a3460159299e4.tar.gz
Add support for TBB/TBH instructions.
Precisize rules for selection of thumb instructions. Add short-cut notation support for most simple Thumb2 instructions ( add r1,#4 instead of add r1,r1,#4 ). git-svn-id: http://svn.freepascal.org/svn/fpc/branches/laksen@29343 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--armiw/compiler/arm/aasmcpu.pas40
-rw-r--r--armiw/compiler/arm/armins.dat56
-rw-r--r--armiw/compiler/arm/armnop.inc2
-rw-r--r--armiw/compiler/arm/armtab.inc297
-rw-r--r--armiw/compiler/assemble.pas6
5 files changed, 386 insertions, 15 deletions
diff --git a/armiw/compiler/arm/aasmcpu.pas b/armiw/compiler/arm/aasmcpu.pas
index 8de6843603..c4b502a6ac 100644
--- a/armiw/compiler/arm/aasmcpu.pas
+++ b/armiw/compiler/arm/aasmcpu.pas
@@ -2319,7 +2319,17 @@ implementation
end
else if p^.code[0]=#$62 then
begin
- if (condition<>C_None) then
+ if ((condition<>C_None) and
+ (not inIT) and
+ (not lastinIT)) then
+ begin
+ Matches:=0;
+ exit;
+ end;
+ end
+ else if p^.code[0]=#$63 then
+ begin
+ if inIT then
begin
Matches:=0;
exit;
@@ -4370,6 +4380,7 @@ implementation
else if ops=2 then
begin
bytes:=bytes or (getsupreg(oper[0]^.reg) shl 8);
+ bytes:=bytes or (getsupreg(oper[0]^.reg) shl 16);
if oper[1]^.typ=top_const then
encodethumbimm(oper[1]^.val)
@@ -4470,7 +4481,10 @@ implementation
bytes:=bytes or (getsupreg(oper[1]^.reg) shl 0);
end
else
- offset:=1;
+ begin
+ bytes:=bytes or (getsupreg(oper[0]^.reg) shl 0);
+ offset:=1;
+ end;
if oper[offset]^.typ=top_const then
begin
@@ -4887,6 +4901,28 @@ implementation
bytes:=bytes or (((offset shr 22) xor (offset shr 23) xor 1) and $1) shl 13;
bytes:=bytes or ((offset shr 23) and $1) shl 26;
end;
+ #$8E: { Thumb-2: TBB/TBH }
+ begin
+ { set instruction code }
+ bytes:=bytes or (ord(insentry^.code[1]) shl 24);
+ bytes:=bytes or (ord(insentry^.code[2]) shl 16);
+ bytes:=bytes or (ord(insentry^.code[3]) shl 8);
+ bytes:=bytes or ord(insentry^.code[4]);
+ { set Rn and Rm }
+ bytes:=bytes or getsupreg(oper[0]^.ref^.base) shl 16;
+
+ if getregtype(oper[0]^.ref^.index)=R_INVALIDREGISTER then
+ message(asmw_e_invalid_effective_address)
+ else
+ begin
+ bytes:=bytes or getsupreg(oper[0]^.ref^.index);
+
+ if (opcode=A_TBH) and
+ (oper[0]^.ref^.shiftmode<>SM_LSL) and
+ (oper[0]^.ref^.shiftimm<>1) then
+ message(asmw_e_invalid_effective_address);
+ end;
+ end;
#$fe: // No written data
begin
exit;
diff --git a/armiw/compiler/arm/armins.dat b/armiw/compiler/arm/armins.dat
index 944bd87ccc..687b681b92 100644
--- a/armiw/compiler/arm/armins.dat
+++ b/armiw/compiler/arm/armins.dat
@@ -88,6 +88,9 @@ void void none
[ADCcc]
reglo,reglo \x60\x41\x40 THUMB,ARMv4T
+reg32,immshifter \x80\xF1\x40\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEB\x40\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEB\x40\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF1\x40\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEB\x40\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEB\x40\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -108,6 +111,9 @@ regsp,regsp,immshifter \x64\xB0\x00 THUMB,ARMv4T
reg32,regsp,reg32 \x64\x44\x68 THUMB,ARMv4T
regsp,reg32 \x64\x44\x85 THUMB,ARMv4T
+reg32,immshifter \x80\xF1\x0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xEB\x0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEB\x0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF1\x0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xEB\x0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEB\x0\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -136,6 +142,9 @@ reg32,memam2 \x33\x2\x0F ARM32,ARMv4
[ANDcc]
reglo,reglo \x60\x40\x00 THUMB,ARMv4T
+reg32,immshifter \x80\xF0\x0\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEA\x0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEA\x0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF0\x0\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEA\x0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEA\x0\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -159,6 +168,9 @@ mem32 \x1\x0A ARM32,ARMv4
[BICcc]
reglo,reglo \x60\x43\x80 THUMB,ARMv4T
+reg32,immshifter \x80\xF0\x20\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEA\x20\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEA\x20\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF0\x20\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEA\x20\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEA\x20\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -246,6 +258,9 @@ reg32,reg32 \x32\x01\x6F\xF\x10 ARM32,ARMv4
[EORcc]
reglo,reglo \x60\x40\x40 THUMB,ARMv4T
+reg32,immshifter \x80\xF0\x80\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEA\x80\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEA\x80\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF0\x80\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEA\x80\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEA\x80\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -365,6 +380,7 @@ regs,immshifter \x13\x03\x28\xF0 ARM32,ARMv4
[MULcc]
reglo,reglo,reglo \x64\x43\x40 THUMB,ARMv4T
+reg32,reg32 \x80\xFB\x00\xF0\x00 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xFB\x00\xF0\x00 THUMB32,ARMv6T2
reg32,reg32,reg32 \x14\x00\x00\x90 ARM32,ARMv4
@@ -401,13 +417,19 @@ void \x2F\x03\x20\xF0\x0 ARM32,ARMv6K
void \x2F\xE1\xA0\x0\x0 ARM32,ARMv4
[ORNcc]
+reg32,immshifter \x80\xF0\x60\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEA\x60\x0\x0 THUMB32,ARMv6T2
+reg32,reg32,shifterop \x80\xEA\x60\x0\x0 THUMB32,ARMv6T2
reg32,reg32,immshifter \x80\xF0\x60\x0\x0 THUMB32,ARMv6T2
-reg32,reg32,reg32 \x80\xEA\x60\x0\x0 THUMB32,WIDE,ARMv6T2
-reg32,reg32,reg32,shifterop \x80\xEA\x60\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,reg32 \x80\xEA\x60\x0\x0 THUMB32,ARMv6T2
+reg32,reg32,reg32,shifterop \x80\xEA\x60\x0\x0 THUMB32,ARMv6T2
[ORRcc]
reglo,reglo \x60\x43\x00 THUMB,ARMv4T
+reg32,immshifter \x80\xF0\x40\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEA\x40\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEA\x40\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF0\x40\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEA\x40\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEA\x40\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -420,9 +442,12 @@ reg32,reg32,immshifter \7\x3\x80 ARM32,ARMv4
[RSBcc]
reglo,reglo,immzero \x60\x42\x40 THUMB,ARMv4T
+reg32,immshifter \x80\xF1\xC0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xEB\xC0\x0\x0 THUMB32,ARMv6T2
+reg32,reg32,shifterop \x80\xEB\xC0\x0\x0 THUMB32,ARMv6T2
reg32,reg32,immshifter \x80\xF1\xC0\x0\x0 THUMB32,WIDE,ARMv6T2
-reg32,reg32,reg32 \x80\xEB\xC0\x0\x0 THUMB32,WIDE,ARMv6T2
-reg32,reg32,reg32,shifterop \x80\xEB\xC0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,reg32 \x80\xEB\xC0\x0\x0 THUMB32,ARMv6T2
+reg32,reg32,reg32,shifterop \x80\xEB\xC0\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \6\x0\x60 ARM32,ARMv4
reg32,reg32,reg32,shifterop \6\x0\x60 ARM32,ARMv4
@@ -437,7 +462,10 @@ reg32,reg32,immshifter \7\x2\xE0 ARM32,ARMv4
[SBCcc]
reglo,reglo \x60\x41\x80 THUMB,ARMv4T
-reg32,reg32,immshifter \x80\xF1\x60\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,immshifter \x80\xF1\x60\x0\x0 THUMB32,ARMv6T2
+reg32,reg32 \x80\xEB\x60\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEB\x60\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,immshifter \x80\xF1\x60\x0\x0 THUMB32,ARMv6T2
reg32,reg32,reg32 \x80\xEB\x60\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEB\x60\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -505,6 +533,9 @@ reglo,reglo,reglo \x60\x1A\x0 THUMB,ARMv4T
reglo,reglo,immshifter \x60\x1E\x0 THUMB,ARMv4T
reglo,imm8 \x60\x38\x0 THUMB,ARMv4T
+reg32,immshifter \x80\xF1\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xEB\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
+reg32,reg32,shifterop \x80\xEB\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x80\xF1\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xEB\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32,shifterop \x80\xEB\xA0\x0\x0 THUMB32,WIDE,ARMv6T2
@@ -822,7 +853,9 @@ void \x2F\x3\x20\xF0\x4 ARM32,ARMv6K
reglo,reglo,immshifter \x60\x1\x0 THUMB,ARMv4T
reglo,reglo \x60\x41\x0 THUMB,ARMv4T
+reg32,immshifter \x82\xEA\x4F\x0\x20 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x82\xEA\x4F\x0\x20 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xFA\x40\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xFA\x40\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x30\x1\xA0\x0\x50 ARM32,ARMv4
@@ -832,7 +865,9 @@ reg32,reg32,immshifter \x30\x1\xA0\x0\x40 ARM32,ARMv4
reglo,reglo,immshifter \x60\x8\x0 THUMB,ARMv4T
reglo,reglo \x60\x40\xC0 THUMB,ARMv4T
+reg32,immshifter \x82\xEA\x4F\x0\x10 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x82\xEA\x4F\x0\x10 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xFA\x20\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xFA\x20\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x30\x1\xA0\x0\x30 ARM32,ARMv4
@@ -842,7 +877,9 @@ reg32,reg32,immshifter \x30\x1\xA0\x0\x20 ARM32,ARMv4
reglo,reglo,immshifter \x60\x0\x0 THUMB,ARMv4T
reglo,reglo \x60\x40\x80 THUMB,ARMv4T
+reg32,immshifter \x82\xEA\x4F\x0\x00 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x82\xEA\x4F\x0\x00 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xFA\x60\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xFA\x60\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x30\x1\xA0\x0\x10 ARM32,ARMv4
@@ -851,7 +888,9 @@ reg32,reg32,immshifter \x30\x1\xA0\x0\x00 ARM32,ARMv4
[RORcc]
reglo,reglo \x60\x41\xC0 THUMB,ARMv4T
+reg32,immshifter \x82\xEA\x4F\x0\x30 THUMB32,WIDE,ARMv6T2
reg32,reg32,immshifter \x82\xEA\x4F\x0\x30 THUMB32,WIDE,ARMv6T2
+reg32,reg32 \x80\xFA\x60\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x80\xFA\x60\xF0\x0 THUMB32,WIDE,ARMv6T2
reg32,reg32,reg32 \x30\x1\xA0\x0\x70 ARM32,ARMv4
@@ -1354,8 +1393,11 @@ condition \xFE ARM32,ARMv4
condition \x6A\xBF\x01\x0E THUMB,ARMv6T2
condition \xFE ARM32,ARMv4
-[TBB]
-[TBH]
+[TBBcc]
+memam2 \x8E\xE8\xD0\xF0\x00 THUMB32,ARMv6T2
+
+[TBHcc]
+memam2 \x8E\xE8\xD0\xF0\x10 THUMB32,ARMv6T2
[MOVW]
reg32,imm32 \x2C\x3\x0 ARM32,ARMv6T2
diff --git a/armiw/compiler/arm/armnop.inc b/armiw/compiler/arm/armnop.inc
index 4dc48ed102..d2c5762997 100644
--- a/armiw/compiler/arm/armnop.inc
+++ b/armiw/compiler/arm/armnop.inc
@@ -1,2 +1,2 @@
{ don't edit, this file is generated from armins.dat }
-653;
+694;
diff --git a/armiw/compiler/arm/armtab.inc b/armiw/compiler/arm/armtab.inc
index f881eef7ed..db5f9d8431 100644
--- a/armiw/compiler/arm/armtab.inc
+++ b/armiw/compiler/arm/armtab.inc
@@ -16,6 +16,27 @@
),
(
opcode : A_ADC;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#241#64#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_ADC;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#235#64#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ADC;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#235#64#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ADC;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#241#64#0#0;
@@ -114,6 +135,27 @@
),
(
opcode : A_ADD;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#241#0#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ADD;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#235#0#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ADD;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#235#0#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ADD;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#241#0#0#0;
@@ -212,6 +254,27 @@
),
(
opcode : A_AND;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#240#0#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_AND;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#234#0#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_AND;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#234#0#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_AND;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#240#0#0#0;
@@ -317,6 +380,27 @@
),
(
opcode : A_BIC;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#240#32#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_BIC;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#234#32#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_BIC;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#234#32#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_BIC;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#240#32#0#0;
@@ -625,6 +709,27 @@
),
(
opcode : A_EOR;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#240#128#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_EOR;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#234#128#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_EOR;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#234#128#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_EOR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#240#128#0#0;
@@ -1101,6 +1206,13 @@
),
(
opcode : A_MUL;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#251#0#240#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_MUL;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#251#0#240#0;
@@ -1241,6 +1353,27 @@
),
(
opcode : A_ORN;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#240#96#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_ORN;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#234#96#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_ORN;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#234#96#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_ORN;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#240#96#0#0;
@@ -1251,14 +1384,14 @@
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#234#96#0#0;
- flags : if_thumb32 or if_wide or if_armv6t2
+ flags : if_thumb32 or if_armv6t2
),
(
opcode : A_ORN;
ops : 4;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none);
code : #128#234#96#0#0;
- flags : if_thumb32 or if_wide or if_armv6t2
+ flags : if_thumb32 or if_armv6t2
),
(
opcode : A_ORR;
@@ -1269,6 +1402,27 @@
),
(
opcode : A_ORR;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#240#64#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_ORR;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#234#64#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ORR;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#234#64#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ORR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#240#64#0#0;
@@ -1325,6 +1479,27 @@
),
(
opcode : A_RSB;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#241#192#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_RSB;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#235#192#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_RSB;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#235#192#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_RSB;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#241#192#0#0;
@@ -1335,14 +1510,14 @@
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#235#192#0#0;
- flags : if_thumb32 or if_wide or if_armv6t2
+ flags : if_thumb32 or if_armv6t2
),
(
opcode : A_RSB;
ops : 4;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none);
code : #128#235#192#0#0;
- flags : if_thumb32 or if_wide or if_armv6t2
+ flags : if_thumb32 or if_armv6t2
),
(
opcode : A_RSB;
@@ -1402,10 +1577,31 @@
),
(
opcode : A_SBC;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#241#96#0#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_SBC;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#235#96#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_SBC;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#235#96#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_SBC;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#241#96#0#0;
- flags : if_thumb32 or if_wide or if_armv6t2
+ flags : if_thumb32 or if_armv6t2
),
(
opcode : A_SBC;
@@ -1689,6 +1885,27 @@
),
(
opcode : A_SUB;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #128#241#160#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_SUB;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#235#160#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_SUB;
+ ops : 3;
+ optypes : (ot_reg32,ot_reg32,ot_shifterop,ot_none,ot_none,ot_none);
+ code : #128#235#160#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_SUB;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #128#241#160#0#0;
@@ -2760,6 +2977,13 @@
),
(
opcode : A_ASR;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #130#234#79#0#32;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ASR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #130#234#79#0#32;
@@ -2767,6 +2991,13 @@
),
(
opcode : A_ASR;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#250#64#240#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ASR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#250#64#240#0;
@@ -2802,6 +3033,13 @@
),
(
opcode : A_LSR;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #130#234#79#0#16;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_LSR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #130#234#79#0#16;
@@ -2809,6 +3047,13 @@
),
(
opcode : A_LSR;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#250#32#240#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_LSR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#250#32#240#0;
@@ -2844,6 +3089,13 @@
),
(
opcode : A_LSL;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #130#234#79#0#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_LSL;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #130#234#79#0#0;
@@ -2851,6 +3103,13 @@
),
(
opcode : A_LSL;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#250#96#240#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_LSL;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#250#96#240#0;
@@ -2879,6 +3138,13 @@
),
(
opcode : A_ROR;
+ ops : 2;
+ optypes : (ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none,ot_none);
+ code : #130#234#79#0#48;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ROR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_immediateshifter,ot_none,ot_none,ot_none);
code : #130#234#79#0#48;
@@ -2886,6 +3152,13 @@
),
(
opcode : A_ROR;
+ ops : 2;
+ optypes : (ot_reg32,ot_reg32,ot_none,ot_none,ot_none,ot_none);
+ code : #128#250#96#240#0;
+ flags : if_thumb32 or if_wide or if_armv6t2
+ ),
+ (
+ opcode : A_ROR;
ops : 3;
optypes : (ot_reg32,ot_reg32,ot_reg32,ot_none,ot_none,ot_none);
code : #128#250#96#240#0;
@@ -4264,6 +4537,20 @@
flags : if_arm32 or if_armv4
),
(
+ opcode : A_TBB;
+ ops : 1;
+ optypes : (ot_memoryam2,ot_none,ot_none,ot_none,ot_none,ot_none);
+ code : #142#232#208#240#0;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
+ opcode : A_TBH;
+ ops : 1;
+ optypes : (ot_memoryam2,ot_none,ot_none,ot_none,ot_none,ot_none);
+ code : #142#232#208#240#16;
+ flags : if_thumb32 or if_armv6t2
+ ),
+ (
opcode : A_MOVW;
ops : 2;
optypes : (ot_reg32,ot_immediate or ot_bits32,ot_none,ot_none,ot_none,ot_none);
diff --git a/armiw/compiler/assemble.pas b/armiw/compiler/assemble.pas
index 39af8f4d0b..ee47f409bf 100644
--- a/armiw/compiler/assemble.pas
+++ b/armiw/compiler/assemble.pas
@@ -1388,6 +1388,7 @@ Implementation
objsymend : TObjSymbol;
zerobuf : array[0..63] of byte;
relative_reloc: boolean;
+ tmp : word;
begin
fillchar(zerobuf,sizeof(zerobuf),0);
fillchar(objsym,sizeof(objsym),0);
@@ -1511,6 +1512,11 @@ Implementation
aitconst_darwin_dwarf_delta32,
aitconst_darwin_dwarf_delta64:
ObjData.writebytes(Tai_const(hp).value,tai_const(hp).size);
+ aitconst_half16bit:
+ begin
+ tmp:=Tai_const(hp).value div 2;
+ ObjData.writebytes(tmp,2);
+ end
else
internalerror(200603254);
end;