summaryrefslogtreecommitdiff
path: root/compiler/arm/narmset.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/arm/narmset.pas')
-rw-r--r--compiler/arm/narmset.pas18
1 files changed, 13 insertions, 5 deletions
diff --git a/compiler/arm/narmset.pas b/compiler/arm/narmset.pas
index 4d0c2cb5ca..9c0d668134 100644
--- a/compiler/arm/narmset.pas
+++ b/compiler/arm/narmset.pas
@@ -191,15 +191,23 @@ implementation
procedure genitem_thumb2(list:TAsmList;t : pcaselabel);
var
- i : aint;
+ i : int64;
begin
if assigned(t^.less) then
genitem_thumb2(list,t^.less);
{ fill possible hole }
- for i:=last.svalue+1 to t^._low.svalue-1 do
- list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,elselabel));
- for i:=t^._low.svalue to t^._high.svalue do
- list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,blocklabel(t^.blockid)));
+ i:=last.svalue+1;
+ while i<=t^._low.svalue-1 do
+ begin
+ list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,elselabel));
+ i:=i+1;
+ end;
+ i:=t^._low.svalue;
+ while i<=t^._high.svalue do
+ begin
+ list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,blocklabel(t^.blockid)));
+ i:=i+1;
+ end;
last:=t^._high.svalue;
if assigned(t^.greater) then
genitem_thumb2(list,t^.greater);