Prechádzať zdrojové kódy

* only for jump instructions we need to look at the relative
offset of an symbol

git-svn-id: trunk@8664 -

peter 18 rokov pred
rodič
commit
c19217f846
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 5 1
      compiler/x86/aasmcpu.pas

+ 5 - 1
compiler/x86/aasmcpu.pas

@@ -953,7 +953,11 @@ implementation
                     end
                     end
                   else
                   else
                     begin
                     begin
-                      if assigned(objdata) then
+                      { Jumps use a relative offset which can be 8bit,
+                        for other opcodes we always need to generate the full
+                        32bit address }
+                      if assigned(objdata) and
+                         is_jmp then
                         begin
                         begin
                           currsym:=objdata.symbolref(ref^.symbol);
                           currsym:=objdata.symbolref(ref^.symbol);
                           l:=ref^.offset;
                           l:=ref^.offset;