Browse Source

report "fixup impossible" compiler error instead of trap in linker

Alexander Shiryaev 4 years ago
parent
commit
c47970fe5f
4 changed files with 10 additions and 0 deletions
  1. BIN
      O7/Mod/ARMv6MG.odc
  2. BIN
      O7/Mod/ARMv7MG.odc
  3. 5 0
      voc-O7/O7ARMv6MG.Mod
  4. 5 0
      voc-O7/O7ARMv7MG.Mod

BIN
O7/Mod/ARMv6MG.odc


BIN
O7/Mod/ARMv7MG.odc


+ 5 - 0
voc-O7/O7ARMv6MG.Mod

@@ -1814,7 +1814,12 @@ http://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.ARM.Compiler.pdf
 		IF x.mode = ORB.Const THEN
 			IF x.r >= 0 THEN Put3(BL, 7, (x.a DIV 4)-pc-1)
 			ELSE (*imported*)
+(*
 				IF pc - fixorgP < 1000H THEN
+*)
+				IF ((-x.r) DIV 10H = 0) (* mno *)
+						& (x.a DIV 100H = 0) (* pno *)
+						& ((pc-fixorgP) DIV 1000H = 0) (* disp *) THEN
 					(* will be fixed up by linker/loader *)
 					Put3orig(BL, 7, ((-x.r) * 100H + x.a) * 1000H + pc-fixorgP);
 					armcode[pc] := 00FFFFFFH; INC(pc);

+ 5 - 0
voc-O7/O7ARMv7MG.Mod

@@ -2233,7 +2233,12 @@ http://infocenter.arm.com/help/topic/com.arm.doc.ddi0439d/DDI0439D_cortex_m4_pro
 		IF x.mode = ORB.Const THEN
 			IF x.r >= 0 THEN Put3(BL, 7, (x.a DIV 4)-pc-1)
 			ELSE (*imported*)
+(*
 				IF pc - fixorgP < 1000H THEN
+*)
+				IF ((-x.r) DIV 10H = 0) (* mno *)
+						& (x.a DIV 100H = 0) (* pno *)
+						& ((pc-fixorgP) DIV 1000H = 0) (* disp *) THEN
 					(* will be fixed up by linker/loader *)
 					Put3orig(BL, 7, ((-x.r) * 100H + x.a) * 1000H + pc-fixorgP);
 					fixorgP := pc-1