Advertisement
Guest User

Untitled

a guest
Dec 21st, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 24.29 KB | None | 0 0
  1. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
  2. target triple = "x86_64-apple-macosx10.5"
  3. ; Begin asmlist al_begin
  4. ; Syms - Begin Staticsymtable
  5. ; Syms - End Staticsymtable
  6. ; [tint643.pp]
  7. ; [64] begin
  8.     %"typ.PROGRAM.tqwordrec" = type <{ i32, i32 }>
  9.     %"typ.SYSTEM.TExceptAddr" = type <{ %"typ.SYSTEM.jmp_buf"*, %"typ.SYSTEM.TExceptAddr"*, i32, i8, i8, i8, i8 }>
  10.     %"typ.SYSTEM.jmp_buf" = type <{ i64, i64, i64, i64, i64, i64, i64, i64 }>
  11.     %"typ.SYSTEM.TextRec" = type <{ i32, i32, i64, i64, i64, i64, [256 x i8]*, i8*, i8*, i8*, i8*, [32 x i8], [256 x i16], [4 x i8], [256 x i8], i16, i8, i8 }>
  12.     %"typ.SYSUTILS.EIntOverflow" = type <{ %"typ.SYSUTILS.EInterror" }>
  13.     %"typ.PROGRAM.$llvmstruct$d00000004i32" = type <{ i8*, i32 }>
  14.     %"typ.SYSUTILS.$vmtdef$EINTOVERFLOW" = type <{ i64, i64, %"typ.SYSTEM.TVmt"**, [256 x i8]*, i8*, i8*, i8*, i8*, i8*, i8*, %"typ.SYSTEM.tinterfacetable"*, %"typ.SYSTEM.TStringMessageTable"*,  void (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.$vmtdef$TOBJECT"*)*,  %"typ.SYSTEM.TObject"* (%"typ.SYSTEM.$vmtdef$TOBJECT"*)*,  void (%"typ.SYSTEM.TObject"*)*,  i32 (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  i8 (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.TObject"*)*,  i64 (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSUTILS.Exception"*, i8**)*, i8* }>
  15.     %"typ.SYSTEM.TObject" = type <{ i8* }>
  16.     %"typ.SYSUTILS.EInterror" = type <{ %"typ.SYSUTILS.EExternal" }>
  17.     %"typ.SYSTEM.TVmt" = type <{ i64, i64, %"typ.SYSTEM.TVmt"**, [256 x i8]*, i8*, i8*, i8*, i8*, i8*, i8*, %"typ.SYSTEM.tinterfacetable"*, %"typ.SYSTEM.TStringMessageTable"*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }>
  18.     %"typ.SYSTEM.tinterfacetable" = type <{ i64, [1 x %"typ.SYSTEM.tinterfaceentry"] }>
  19.     %"typ.SYSTEM.TStringMessageTable" = type <{ i32, i8, i8, i8, i8, [1 x %"typ.SYSTEM.TMsgStrTable"] }>
  20.     %"typ.SYSUTILS.Exception" = type <{ %"typ.SYSTEM.TObject", i8*, i32, i8, i8, i8, i8 }>
  21.     %"typ.SYSTEM.$vmtdef$TOBJECT" = type <{ i64, i64, %"typ.SYSTEM.TVmt"**, [256 x i8]*, i8*, i8*, i8*, i8*, i8*, i8*, %"typ.SYSTEM.tinterfacetable"*, %"typ.SYSTEM.TStringMessageTable"*,  void (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.$vmtdef$TOBJECT"*)*,  %"typ.SYSTEM.TObject"* (%"typ.SYSTEM.$vmtdef$TOBJECT"*)*,  void (%"typ.SYSTEM.TObject"*)*,  i32 (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  void (%"typ.SYSTEM.TObject"*, i8*)*,  i8 (%"typ.SYSTEM.TObject"*, %"typ.SYSTEM.TObject"*)*,  i64 (%"typ.SYSTEM.TObject"*)*,  void (%"typ.SYSTEM.TObject"*, i8**)*, i8* }>
  22.     %"typ.SYSUTILS.EExternal" = type <{ %"typ.SYSUTILS.Exception" }>
  23.     %"typ.SYSTEM.tinterfaceentry" = type <{ %"typ.SYSTEM.TGuid"**, i8*, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }>
  24.     %"typ.SYSTEM.TMsgStrTable" = type <{ [256 x i8]*, i8* }>
  25.     %"typ.SYSTEM.TGuid" = type <{ i32, i16, i16, [8 x i8] }>
  26. ; End asmlist al_begin
  27. ; Begin asmlist al_procedures
  28. define void @"\01_P$PROGRAM_$$_ASSIGNQWORD$LONGWORD$LONGWORD$QWORD"(i32 %p.h, i32 %p.l, i64* %p.q) nobuiltin {
  29. ; [16] procedure assignqword(h,l : dword;var q : qword);
  30.     %tmp.1 = alloca i32, align 8
  31.     %tmp.2 = alloca i32, align 8
  32.     %tmp.3 = alloca i64*, align 8
  33. ; Var h located at %tmp.1
  34. ; Var l located at %tmp.2
  35. ; Var q located at %tmp.3
  36. ; [18] begin
  37.     store i32 %p.h, i32* %tmp.1, align 8
  38.     store i32 %p.l, i32* %tmp.2, align 8
  39.     store i64* %p.q, i64** %tmp.3, align 8
  40. ; [19] tqwordrec(q).high:=h;
  41.     %reg.1_16 = load i64*, i64** %tmp.3, align 8
  42.     %reg.1_17 = bitcast i64* %reg.1_16 to %"typ.PROGRAM.tqwordrec"*
  43.     %reg.1_18 = getelementptr %"typ.PROGRAM.tqwordrec", %"typ.PROGRAM.tqwordrec"* %reg.1_17, i32 0, i32 1
  44.     %reg.1_19 = load i32, i32* %tmp.1, align 8
  45.     store i32 %reg.1_19, i32* %reg.1_18, align 4
  46. ; [20] tqwordrec(q).low:=l;
  47.     %reg.1_20 = load i64*, i64** %tmp.3, align 8
  48.     %reg.1_21 = bitcast i64* %reg.1_20 to %"typ.PROGRAM.tqwordrec"*
  49.     %reg.1_22 = getelementptr %"typ.PROGRAM.tqwordrec", %"typ.PROGRAM.tqwordrec"* %reg.1_21, i32 0, i32 0
  50.     %reg.1_23 = load i32, i32* %tmp.2, align 8
  51.     store i32 %reg.1_23, i32* %reg.1_22, align 8
  52. ; [21] end;
  53.     br label %Lj5
  54. Lj5:
  55.     ret void
  56. }
  57. define void @"\01_P$PROGRAM_$$_TESTMULQWORD"() nobuiltin personality i8* bitcast ( i64 (i32, i32, i64, i8*, i8*)* @"\01_SYSTEM_$$__FPC_EXCEPTION_PERSONALITY_DO_NOTHING_V0$crcCBEBE3B3" to i8*) {
  58. ; Temps allocated between rbp+6 and rbp+21
  59. ; [23] procedure testmulqword;
  60.     %tmp.1 = alloca i64, align 8
  61.     %tmp.2 = alloca i64, align 8
  62.     %tmp.3 = alloca i64, align 8
  63.     %tmp.4 = alloca i64, align 8
  64.     %tmp.5 = alloca i32, align 4
  65.     %tmp.6 = alloca i32, align 4
  66.     %tmp.7 = alloca %"typ.SYSTEM.TExceptAddr", align 8
  67.     %tmp.8 = alloca %"typ.SYSTEM.jmp_buf", align 8
  68.     %tmp.9 = alloca i64, align 8
  69.     %tmp.10 = alloca i8*, align 8
  70.     %tmp.11 = alloca %"typ.SYSTEM.TextRec"*, align 8
  71.     %tmp.12 = alloca i8*, align 8
  72.     %tmp.13 = alloca %"typ.SYSTEM.TextRec"*, align 8
  73.     %tmp.14 = alloca i8*, align 8
  74.     %tmp.15 = alloca %"typ.SYSTEM.TextRec"*, align 8
  75.     %tmp.16 = alloca %"typ.SYSUTILS.EIntOverflow"*, align 8
  76.     %tmp.17 = alloca %"typ.SYSTEM.TExceptAddr", align 8
  77.     %tmp.18 = alloca %"typ.SYSTEM.jmp_buf", align 8
  78.     %tmp.19 = alloca i64, align 8
  79.     %tmp.20 = alloca i8*, align 8
  80.     %tmp.21 = alloca %"typ.SYSTEM.TextRec"*, align 8
  81. ; Var q1 located at %tmp.1
  82. ; Var q2 located at %tmp.2
  83. ; Var q3 located at %tmp.3
  84. ; Var q4 located at %tmp.4
  85. ; Var c located at %tmp.5
  86. ; Var loops located at %tmp.6
  87. ; [28] begin
  88. ; [29] assignqword(0,$1000,q1);
  89.     %reg.1_16 = bitcast i64* %tmp.1 to i64*
  90.     call void (i32, i32, i64*) @"\01_P$PROGRAM_$$_ASSIGNQWORD$LONGWORD$LONGWORD$QWORD" (i32 0, i32 4096, i64* %reg.1_16)
  91. ; [30] assignqword(0,$7fff,q2);
  92.     %reg.1_19 = bitcast i64* %tmp.2 to i64*
  93.     call void (i32, i32, i64*) @"\01_P$PROGRAM_$$_ASSIGNQWORD$LONGWORD$LONGWORD$QWORD" (i32 0, i32 32767, i64* %reg.1_19)
  94. ; [31] c := $1000 * $7fff;
  95.     store i32 134213632, i32* %tmp.5, align 4
  96. ; [32] q4 := c;
  97.     %reg.1_23 = load i32, i32* %tmp.5, align 4
  98.     %reg.1_22 = zext i32 %reg.1_23 to i64
  99.     store i64 %reg.1_22, i64* %tmp.4, align 8
  100. ; [33] loops := 0;
  101.     store i32 0, i32* %tmp.6, align 4
  102. ; [34] try
  103.     %reg.1_26 = bitcast %"typ.SYSTEM.TExceptAddr"* %tmp.7 to i8*
  104.     %reg.1_25 = bitcast %"typ.SYSTEM.jmp_buf"* %tmp.8 to i8*
  105.     %reg.1_27 = call %"typ.SYSTEM.jmp_buf"* (i32, i8*, i8*) @"\01fpc_pushexceptaddr" (i32 1, i8* %reg.1_25, i8* %reg.1_26)
  106.     %reg.1_28 = bitcast %"typ.SYSTEM.jmp_buf"* %reg.1_27 to %"typ.SYSTEM.jmp_buf"*
  107.     %reg.1_29 = bitcast %"typ.SYSTEM.jmp_buf"* %reg.1_28 to %"typ.SYSTEM.jmp_buf"*
  108.     %reg.1_30 = call i32 (%"typ.SYSTEM.jmp_buf"*) @"\01fpc_setjmp" (%"typ.SYSTEM.jmp_buf"* %reg.1_29)
  109.     %reg.1_31 = bitcast i32 %reg.1_30 to i32
  110.     %reg.1_32 = zext i32 %reg.1_31 to i64
  111.     store i64 %reg.1_32, i64* %tmp.9, align 8
  112.     %reg.1_33 = trunc i64 0 to i32
  113.     %reg.1_34 = icmp ne i32 %reg.1_31, %reg.1_33
  114.     br i1 %reg.1_34, label %Lj13, label %Lj14
  115. Lj14:
  116. ; [35] repeat
  117.     br label %Lj16
  118. Lj16:
  119. ; [36] q3 := q1 * q2;
  120.     %reg.1_35 = load i64, i64* %tmp.1, align 8
  121.     %reg.1_36 = load i64, i64* %tmp.2, align 8
  122.     %reg.1_38 = zext i64 %reg.1_35 to i128
  123.     %reg.1_39 = zext i64 %reg.1_36 to i128
  124.     %reg.1_40 = mul i128 %reg.1_39, %reg.1_38
  125.     %reg.1_37 = trunc i128 %reg.1_40 to i64
  126.     %reg.1_41 = zext i64 %reg.1_37 to i128
  127.     %reg.1_42 = icmp ne i128 %reg.1_41, %reg.1_40
  128.     %reg.1_43 = trunc i64 0 to i1
  129.     %reg.1_44 = icmp eq i1 %reg.1_42, %reg.1_43
  130.     br i1 %reg.1_44, label %Lj19, label %Lj20
  131. Lj20:
  132.     invoke void () @"\01fpc_overflow" () to label %Lj21 unwind label %Lj15
  133. Lj21:
  134.     br label %Lj19
  135. Lj19:
  136.     store i64 %reg.1_37, i64* %tmp.3, align 8
  137. ; [37] if q3 <> q4 then
  138.     %reg.1_45 = load i64, i64* %tmp.3, align 8
  139.     %reg.1_46 = load i64, i64* %tmp.4, align 8
  140.     %reg.1_47 = icmp ne i64 %reg.1_45, %reg.1_46
  141.     %reg.1_48 = zext i1 %reg.1_47 to i8
  142.     %reg.1_49 = trunc i8 %reg.1_48 to i1
  143.     br i1 %reg.1_49, label %Lj22, label %Lj24
  144. Lj24:
  145.     br label %Lj23
  146. Lj22:
  147. ; [39] writeln('qword multiplication of shift error');
  148.     %reg.1_50 = invoke %"typ.SYSTEM.TextRec"* () @"\01fpc_get_output" () to label %Lj25 unwind label %Lj15
  149. Lj25:
  150.     %reg.1_51 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_50 to %"typ.SYSTEM.TextRec"*
  151.     store %"typ.SYSTEM.TextRec"* %reg.1_51, %"typ.SYSTEM.TextRec"** %tmp.11, align 8
  152.     %reg.1_52 = bitcast %"typ.SYSTEM.TextRec"** %tmp.11 to i8**
  153.     %reg.1_53 = load i8*, i8** %reg.1_52, align 8
  154.     store i8* %reg.1_53, i8** %tmp.10, align 8
  155.     %reg.1_54 = bitcast [36 x i8]*  bitcast ([37 x i8]* @"\01_$PROGRAM$_Ld1" to [36 x i8]*) to [256 x i8]*
  156.     %reg.1_55 = bitcast [256 x i8]* %reg.1_54 to [256 x i8]*
  157.     %reg.1_56 = load i8*, i8** %tmp.10, align 8
  158.     %reg.1_57 = bitcast i8* %reg.1_56 to %"typ.SYSTEM.TextRec"*
  159.     %reg.1_58 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_57 to %"typ.SYSTEM.TextRec"*
  160.     invoke void (i32, %"typ.SYSTEM.TextRec"*, [256 x i8]*) @"\01fpc_write_text_shortstr" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_58, [256 x i8]* %reg.1_55) to label %Lj26 unwind label %Lj15
  161. Lj26:
  162.     invoke void () @"\01fpc_iocheck" () to label %Lj27 unwind label %Lj15
  163. Lj27:
  164.     %reg.1_60 = load i8*, i8** %tmp.10, align 8
  165.     %reg.1_61 = bitcast i8* %reg.1_60 to %"typ.SYSTEM.TextRec"*
  166.     %reg.1_62 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_61 to %"typ.SYSTEM.TextRec"*
  167.     invoke void (%"typ.SYSTEM.TextRec"*) @"\01fpc_writeln_end" (%"typ.SYSTEM.TextRec"* %reg.1_62) to label %Lj28 unwind label %Lj15
  168. Lj28:
  169.     invoke void () @"\01fpc_iocheck" () to label %Lj29 unwind label %Lj15
  170. Lj29:
  171. ; [40] halt(1);
  172.     invoke void (i32) @"\01_SYSTEM_$$_HALT$LONGINT" (i32 1) to label %Lj30 unwind label %Lj15
  173. Lj30:
  174.     br label %Lj23
  175. Lj23:
  176. ; [42] inc(loops);
  177.     %reg.1_65 = load i32, i32* %tmp.6, align 4
  178.     %reg.1_64 = sext i32 %reg.1_65 to i64
  179.     %reg.1_66 = add i64 %reg.1_64, 1
  180.     %reg.1_68 = bitcast i64 %reg.1_66 to i64
  181.     %reg.1_67 = trunc i64 %reg.1_68 to i32
  182.     store i32 %reg.1_67, i32* %tmp.6, align 4
  183. ; [43] if (loops >= 39) then
  184.     %reg.1_69 = load i32, i32* %tmp.6, align 4
  185.     %reg.1_70 = icmp sge i32 %reg.1_69, 39
  186.     %reg.1_71 = zext i1 %reg.1_70 to i8
  187.     %reg.1_72 = trunc i8 %reg.1_71 to i1
  188.     br i1 %reg.1_72, label %Lj31, label %Lj33
  189. Lj33:
  190.     br label %Lj32
  191. Lj31:
  192. ; [45] writeln('qword multiplication overflow detection failed');
  193.     %reg.1_73 = invoke %"typ.SYSTEM.TextRec"* () @"\01fpc_get_output" () to label %Lj34 unwind label %Lj15
  194. Lj34:
  195.     %reg.1_74 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_73 to %"typ.SYSTEM.TextRec"*
  196.     store %"typ.SYSTEM.TextRec"* %reg.1_74, %"typ.SYSTEM.TextRec"** %tmp.13, align 8
  197.     %reg.1_75 = bitcast %"typ.SYSTEM.TextRec"** %tmp.13 to i8**
  198.     %reg.1_76 = load i8*, i8** %reg.1_75, align 8
  199.     store i8* %reg.1_76, i8** %tmp.12, align 8
  200.     %reg.1_77 = bitcast [47 x i8]*  bitcast ([48 x i8]* @"\01_$PROGRAM$_Ld2" to [47 x i8]*) to [256 x i8]*
  201.     %reg.1_78 = bitcast [256 x i8]* %reg.1_77 to [256 x i8]*
  202.     %reg.1_79 = load i8*, i8** %tmp.12, align 8
  203.     %reg.1_80 = bitcast i8* %reg.1_79 to %"typ.SYSTEM.TextRec"*
  204.     %reg.1_81 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_80 to %"typ.SYSTEM.TextRec"*
  205.     invoke void (i32, %"typ.SYSTEM.TextRec"*, [256 x i8]*) @"\01fpc_write_text_shortstr" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_81, [256 x i8]* %reg.1_78) to label %Lj35 unwind label %Lj15
  206. Lj35:
  207.     invoke void () @"\01fpc_iocheck" () to label %Lj36 unwind label %Lj15
  208. Lj36:
  209.     %reg.1_83 = load i8*, i8** %tmp.12, align 8
  210.     %reg.1_84 = bitcast i8* %reg.1_83 to %"typ.SYSTEM.TextRec"*
  211.     %reg.1_85 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_84 to %"typ.SYSTEM.TextRec"*
  212.     invoke void (%"typ.SYSTEM.TextRec"*) @"\01fpc_writeln_end" (%"typ.SYSTEM.TextRec"* %reg.1_85) to label %Lj37 unwind label %Lj15
  213. Lj37:
  214.     invoke void () @"\01fpc_iocheck" () to label %Lj38 unwind label %Lj15
  215. Lj38:
  216. ; [46] halt(1);
  217.     invoke void (i32) @"\01_SYSTEM_$$_HALT$LONGINT" (i32 1) to label %Lj39 unwind label %Lj15
  218. Lj39:
  219.     br label %Lj32
  220. Lj32:
  221. ; [48] q1 := q1 shl 1;
  222.     %reg.1_87 = load i64, i64* %tmp.1, align 8
  223.     %reg.1_88 = shl i64 %reg.1_87, 1
  224.     store i64 %reg.1_88, i64* %tmp.1, align 8
  225. ; [49] q4 := q4 shl 1;
  226.     %reg.1_89 = load i64, i64* %tmp.4, align 8
  227.     %reg.1_90 = shl i64 %reg.1_89, 1
  228.     store i64 %reg.1_90, i64* %tmp.4, align 8
  229. ; [50] writeln(loops,': ',q3);
  230.     %reg.1_91 = invoke %"typ.SYSTEM.TextRec"* () @"\01fpc_get_output" () to label %Lj40 unwind label %Lj15
  231. Lj40:
  232.     %reg.1_92 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_91 to %"typ.SYSTEM.TextRec"*
  233.     store %"typ.SYSTEM.TextRec"* %reg.1_92, %"typ.SYSTEM.TextRec"** %tmp.15, align 8
  234.     %reg.1_93 = bitcast %"typ.SYSTEM.TextRec"** %tmp.15 to i8**
  235.     %reg.1_94 = load i8*, i8** %reg.1_93, align 8
  236.     store i8* %reg.1_94, i8** %tmp.14, align 8
  237.     %reg.1_96 = load i32, i32* %tmp.6, align 4
  238.     %reg.1_95 = sext i32 %reg.1_96 to i64
  239.     %reg.1_97 = bitcast i64 %reg.1_95 to i64
  240.     %reg.1_98 = load i8*, i8** %tmp.14, align 8
  241.     %reg.1_99 = bitcast i8* %reg.1_98 to %"typ.SYSTEM.TextRec"*
  242.     %reg.1_100 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_99 to %"typ.SYSTEM.TextRec"*
  243.     invoke void (i32, %"typ.SYSTEM.TextRec"*, i64) @"\01fpc_write_text_sint" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_100, i64 %reg.1_97) to label %Lj41 unwind label %Lj15
  244. Lj41:
  245.     invoke void () @"\01fpc_iocheck" () to label %Lj42 unwind label %Lj15
  246. Lj42:
  247.     %reg.1_102 = bitcast [3 x i8]*  bitcast ([4 x i8]* @"\01_$PROGRAM$_Ld3" to [3 x i8]*) to [256 x i8]*
  248.     %reg.1_103 = bitcast [256 x i8]* %reg.1_102 to [256 x i8]*
  249.     %reg.1_104 = load i8*, i8** %tmp.14, align 8
  250.     %reg.1_105 = bitcast i8* %reg.1_104 to %"typ.SYSTEM.TextRec"*
  251.     %reg.1_106 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_105 to %"typ.SYSTEM.TextRec"*
  252.     invoke void (i32, %"typ.SYSTEM.TextRec"*, [256 x i8]*) @"\01fpc_write_text_shortstr" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_106, [256 x i8]* %reg.1_103) to label %Lj43 unwind label %Lj15
  253. Lj43:
  254.     invoke void () @"\01fpc_iocheck" () to label %Lj44 unwind label %Lj15
  255. Lj44:
  256.     %reg.1_108 = load i64, i64* %tmp.3, align 8
  257.     %reg.1_109 = load i8*, i8** %tmp.14, align 8
  258.     %reg.1_110 = bitcast i8* %reg.1_109 to %"typ.SYSTEM.TextRec"*
  259.     %reg.1_111 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_110 to %"typ.SYSTEM.TextRec"*
  260.     invoke void (i32, %"typ.SYSTEM.TextRec"*, i64) @"\01fpc_write_text_uint" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_111, i64 %reg.1_108) to label %Lj45 unwind label %Lj15
  261. Lj45:
  262.     invoke void () @"\01fpc_iocheck" () to label %Lj46 unwind label %Lj15
  263. Lj46:
  264.     %reg.1_113 = load i8*, i8** %tmp.14, align 8
  265.     %reg.1_114 = bitcast i8* %reg.1_113 to %"typ.SYSTEM.TextRec"*
  266.     %reg.1_115 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_114 to %"typ.SYSTEM.TextRec"*
  267.     invoke void (%"typ.SYSTEM.TextRec"*) @"\01fpc_writeln_end" (%"typ.SYSTEM.TextRec"* %reg.1_115) to label %Lj47 unwind label %Lj15
  268. Lj47:
  269.     invoke void () @"\01fpc_iocheck" () to label %Lj48 unwind label %Lj15
  270. Lj48:
  271.     br label %Lj17
  272. Lj17:
  273. ; [51] until false;
  274.     br label %Lj16
  275.     br label %Lj13
  276. Lj15:
  277.     %reg.1_116 = landingpad %"typ.PROGRAM.$llvmstruct$d00000004i32"     catch i8* null
  278.  
  279.     br label %Lj13
  280. Lj13:
  281.     call void () @"\01fpc_popaddrstack" ()
  282.     %reg.1_117 = load i64, i64* %tmp.9, align 8
  283.     %reg.1_118 = bitcast i64 0 to i64
  284.     %reg.1_119 = icmp eq i64 %reg.1_117, %reg.1_118
  285.     br i1 %reg.1_119, label %Lj11, label %Lj49
  286. Lj49:
  287. ; [60] end;
  288.     %reg.1_120 = bitcast %"typ.SYSUTILS.$vmtdef$EINTOVERFLOW"* @"\01_VMT_$SYSUTILS_$$_EINTOVERFLOW" to %"typ.SYSTEM.$vmtdef$TOBJECT"*
  289.     %reg.1_121 = call %"typ.SYSTEM.TObject"* (%"typ.SYSTEM.$vmtdef$TOBJECT"*) @"\01fpc_catches" (%"typ.SYSTEM.$vmtdef$TOBJECT"* %reg.1_120)
  290.     %reg.1_122 = bitcast %"typ.SYSTEM.TObject"* %reg.1_121 to %"typ.SYSTEM.TObject"*
  291.     %reg.1_123 = inttoptr i64 0 to %"typ.SYSTEM.TObject"*
  292.     %reg.1_124 = icmp eq %"typ.SYSTEM.TObject"* %reg.1_122, %reg.1_123
  293.     br i1 %reg.1_124, label %Lj50, label %Lj51
  294. Lj51:
  295.     %reg.1_125 = bitcast %"typ.SYSTEM.TObject"* %reg.1_122 to %"typ.SYSUTILS.EIntOverflow"*
  296.     store %"typ.SYSUTILS.EIntOverflow"* %reg.1_125, %"typ.SYSUTILS.EIntOverflow"** %tmp.16, align 8
  297.     %reg.1_128 = bitcast %"typ.SYSTEM.TExceptAddr"* %tmp.17 to i8*
  298.     %reg.1_127 = bitcast %"typ.SYSTEM.jmp_buf"* %tmp.18 to i8*
  299.     %reg.1_129 = call %"typ.SYSTEM.jmp_buf"* (i32, i8*, i8*) @"\01fpc_pushexceptaddr" (i32 1, i8* %reg.1_127, i8* %reg.1_128)
  300.     %reg.1_130 = bitcast %"typ.SYSTEM.jmp_buf"* %reg.1_129 to %"typ.SYSTEM.jmp_buf"*
  301.     %reg.1_131 = bitcast %"typ.SYSTEM.jmp_buf"* %reg.1_130 to %"typ.SYSTEM.jmp_buf"*
  302.     %reg.1_132 = call i32 (%"typ.SYSTEM.jmp_buf"*) @"\01fpc_setjmp" (%"typ.SYSTEM.jmp_buf"* %reg.1_131)
  303.     %reg.1_133 = bitcast i32 %reg.1_132 to i32
  304.     %reg.1_134 = zext i32 %reg.1_133 to i64
  305.     store i64 %reg.1_134, i64* %tmp.19, align 8
  306.     %reg.1_135 = trunc i64 0 to i32
  307.     %reg.1_136 = icmp ne i32 %reg.1_133, %reg.1_135
  308.     br i1 %reg.1_136, label %Lj52, label %Lj53
  309. Lj53:
  310. ; [55] if loops < 38 then
  311.     %reg.1_137 = load i32, i32* %tmp.6, align 4
  312.     %reg.1_138 = icmp slt i32 %reg.1_137, 38
  313.     %reg.1_139 = zext i1 %reg.1_138 to i8
  314.     %reg.1_140 = trunc i8 %reg.1_139 to i1
  315.     br i1 %reg.1_140, label %Lj56, label %Lj58
  316. Lj58:
  317.     br label %Lj57
  318. Lj56:
  319. ; [57] writeln('false qword multiplication overflow detected');
  320.     %reg.1_141 = invoke %"typ.SYSTEM.TextRec"* () @"\01fpc_get_output" () to label %Lj59 unwind label %Lj54
  321. Lj59:
  322.     %reg.1_142 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_141 to %"typ.SYSTEM.TextRec"*
  323.     store %"typ.SYSTEM.TextRec"* %reg.1_142, %"typ.SYSTEM.TextRec"** %tmp.21, align 8
  324.     %reg.1_143 = bitcast %"typ.SYSTEM.TextRec"** %tmp.21 to i8**
  325.     %reg.1_144 = load i8*, i8** %reg.1_143, align 8
  326.     store i8* %reg.1_144, i8** %tmp.20, align 8
  327.     %reg.1_145 = bitcast [45 x i8]*     bitcast ([46 x i8]* @"\01_$PROGRAM$_Ld4" to [45 x i8]*) to [256 x i8]*
  328.     %reg.1_146 = bitcast [256 x i8]* %reg.1_145 to [256 x i8]*
  329.     %reg.1_147 = load i8*, i8** %tmp.20, align 8
  330.     %reg.1_148 = bitcast i8* %reg.1_147 to %"typ.SYSTEM.TextRec"*
  331.     %reg.1_149 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_148 to %"typ.SYSTEM.TextRec"*
  332.     invoke void (i32, %"typ.SYSTEM.TextRec"*, [256 x i8]*) @"\01fpc_write_text_shortstr" (i32 0, %"typ.SYSTEM.TextRec"* %reg.1_149, [256 x i8]* %reg.1_146) to label %Lj60 unwind label %Lj54
  333. Lj60:
  334.     invoke void () @"\01fpc_iocheck" () to label %Lj61 unwind label %Lj54
  335. Lj61:
  336.     %reg.1_151 = load i8*, i8** %tmp.20, align 8
  337.     %reg.1_152 = bitcast i8* %reg.1_151 to %"typ.SYSTEM.TextRec"*
  338.     %reg.1_153 = bitcast %"typ.SYSTEM.TextRec"* %reg.1_152 to %"typ.SYSTEM.TextRec"*
  339.     invoke void (%"typ.SYSTEM.TextRec"*) @"\01fpc_writeln_end" (%"typ.SYSTEM.TextRec"* %reg.1_153) to label %Lj62 unwind label %Lj54
  340. Lj62:
  341.     invoke void () @"\01fpc_iocheck" () to label %Lj63 unwind label %Lj54
  342. Lj63:
  343. ; [58] halt(1);
  344.     invoke void (i32) @"\01_SYSTEM_$$_HALT$LONGINT" (i32 1) to label %Lj64 unwind label %Lj54
  345. Lj64:
  346.     br label %Lj57
  347. Lj57:
  348.     br label %Lj52
  349. Lj54:
  350.     %reg.1_155 = landingpad %"typ.PROGRAM.$llvmstruct$d00000004i32"     catch i8* null
  351.  
  352.     br label %Lj52
  353. Lj52:
  354.     call void () @"\01fpc_popaddrstack" ()
  355.     %reg.1_156 = load i64, i64* %tmp.19, align 8
  356.     %reg.1_157 = bitcast i64 0 to i64
  357.     %reg.1_158 = icmp eq i64 %reg.1_156, %reg.1_157
  358.     br i1 %reg.1_158, label %Lj65, label %Lj66
  359. Lj66:
  360.     call void () @"\01fpc_raise_nested" ()
  361.     br label %Lj65
  362. Lj65:
  363.     call void () @"\01fpc_doneexception" ()
  364.     br label %Lj11
  365. Lj50:
  366.     br label %Lj12
  367. Lj12:
  368.     call void () @"\01fpc_reraise" ()
  369.     br label %Lj11
  370. Lj11:
  371. ; [62] end;
  372.     br label %Lj7
  373. Lj7:
  374.     ret void
  375. }
  376. define void @"\01_main"(i32 %p.ARGC, i8** %p.ARGV, i8** %p.ARGP) nobuiltin {
  377. ; [7] type
  378.     %tmp.1 = alloca i32, align 8
  379.     %tmp.2 = alloca i8**, align 8
  380.     %tmp.3 = alloca i8**, align 8
  381. ; Var ARGC located at %tmp.1
  382. ; Var ARGV located at %tmp.2
  383. ; Var ARGP located at %tmp.3
  384.     %reg.1_16 = bitcast i32 %p.ARGC to i32
  385.     store i32 %reg.1_16, i32* %tmp.1, align 8
  386.     store i8** %p.ARGV, i8*** %tmp.2, align 8
  387.     store i8** %p.ARGP, i8*** %tmp.3, align 8
  388.     %reg.1_17 = load i8**, i8*** %tmp.3, align 8
  389.     %reg.1_18 = load i8**, i8*** %tmp.2, align 8
  390.     %reg.1_20 = bitcast i32* %tmp.1 to i32*
  391.     %reg.1_19 = load i32, i32* %reg.1_20, align 8
  392.     call void (i32, i8**, i8**) @"\01_FPC_SYSTEMMAIN" (i32 %reg.1_19, i8** %reg.1_18, i8** %reg.1_17)
  393.     br label %Lj67
  394. Lj67:
  395.     ret void
  396. }
  397. define void @"\01_PASCALMAIN"() nobuiltin noreturn {
  398. ; [tint643.pp]
  399.     call void () @"\01fpc_initializeunits" ()
  400. ; [65] testmulqword;
  401.     call void () @"\01_P$PROGRAM_$$_TESTMULQWORD" ()
  402. ; [66] end.
  403.     br label %Lj3
  404. Lj3:
  405.     call void () @"\01fpc_do_exit" ()
  406.     ret void
  407. }
  408. declare i64 @"\01_SYSTEM_$$__FPC_EXCEPTION_PERSONALITY_DO_NOTHING_V0$crcCBEBE3B3"(i32, i32, i64, i8*, i8*) nobuiltin
  409. declare %"typ.SYSTEM.jmp_buf"* @"\01fpc_pushexceptaddr"(i32, i8*, i8*) nobuiltin
  410. declare i32 @"\01fpc_setjmp"(%"typ.SYSTEM.jmp_buf"*) returns_twice nobuiltin
  411. declare void @"\01fpc_overflow"() nobuiltin
  412. declare %"typ.SYSTEM.TextRec"* @"\01fpc_get_output"() nobuiltin
  413. declare void @"\01fpc_write_text_shortstr"(i32, %"typ.SYSTEM.TextRec"*, [256 x i8]*) nobuiltin
  414. declare void @"\01fpc_iocheck"() nobuiltin
  415. declare void @"\01fpc_writeln_end"(%"typ.SYSTEM.TextRec"*) nobuiltin
  416. declare void @"\01_SYSTEM_$$_HALT$LONGINT"(i32) nobuiltin
  417. declare void @"\01fpc_write_text_sint"(i32, %"typ.SYSTEM.TextRec"*, i64) nobuiltin
  418. declare void @"\01fpc_write_text_uint"(i32, %"typ.SYSTEM.TextRec"*, i64) nobuiltin
  419. declare void @"\01fpc_popaddrstack"() nobuiltin
  420. @"\01_VMT_$SYSUTILS_$$_EINTOVERFLOW" = external global %"typ.SYSUTILS.$vmtdef$EINTOVERFLOW", align 8
  421. declare %"typ.SYSTEM.TObject"* @"\01fpc_catches"(%"typ.SYSTEM.$vmtdef$TOBJECT"*) nobuiltin
  422. declare void @"\01fpc_raise_nested"() nobuiltin
  423. declare void @"\01fpc_doneexception"() nobuiltin
  424. declare void @"\01fpc_reraise"() nobuiltin
  425. declare void @"\01_FPC_SYSTEMMAIN"(i32, i8**, i8**) nobuiltin
  426. declare void @"\01fpc_initializeunits"() nobuiltin
  427. declare void @"\01fpc_do_exit"() nobuiltin
  428. ; End asmlist al_procedures
  429. ; Begin asmlist al_globals
  430. @"\01INITFINAL" = global <{ i64, i64, i8*, i8*, i8*, i8*, i8*, i8*,  void ()*,  void ()*, i8*, i8* }> <{i64 5, i64 zeroinitializer, i8* bitcast (i8** @"\01_INIT$_$SYSTEM" to i8*), i8* zeroinitializer, i8* zeroinitializer, i8* bitcast (i8** @"\01_FINALIZE$_$OBJPAS" to i8*), i8* bitcast (i8** @"\01_INIT$_$UNIX" to i8*), i8* bitcast (i8** @"\01_FINALIZE$_$UNIX" to i8*),  void ()* bitcast ( void ()** @"\01_SYSUTILS$_$TENCODING_$__$$_create" to  void ()*),  void ()* bitcast ( void ()** @"\01_SYSUTILS$_$TENCODING_$__$$_destroy" to  void ()*), i8* bitcast (i8** @"\01_INIT$_$SYSUTILS" to i8*), i8* bitcast (i8** @"\01_FINALIZE$_$SYSUTILS" to i8*)}>, align 8
  431. @"\01FPC_THREADVARTABLES" = global <{ i32, i8* }> <{i32 1, i8* bitcast (i8** @"\01_THREADVARLIST_$SYSTEM$indirect" to i8*)}>, align 8
  432. @"\01FPC_RESOURCESTRINGTABLES" = constant <{ i64, i8*, i8* }> <{i64 1, i8* bitcast (i8** @"\01_RESSTR_$SYSCONST_$$_START$indirect" to i8*), i8* bitcast (i8** @"\01_RESSTR_$SYSCONST_$$_END$indirect" to i8*)}>, align 8
  433. @"\01FPC_WIDEINITTABLES" = global <{ i64 }> <{i64 zeroinitializer}>, align 8
  434. @"\01FPC_RESSTRINITTABLES" = global <{ i64 }> <{i64 zeroinitializer}>, align 8
  435. @"\01__fpc_ident" = internal global [42 x i8] c"FPC 3.1.1 [2016/12/18] for x86_64 - Darwin", align 8
  436. @"\01__stklen" = global i64 262144, align 8
  437. @"\01__heapsize" = global i64 zeroinitializer, align 8
  438. @"\01__fpc_valgrind" = global i8 zeroinitializer, align 8
  439. @"\01FPC_RESLOCATION" = constant i8* zeroinitializer, align 8
  440. @llvm.used = appending global [1 x i8*] [i8* bitcast ([42 x i8]* @"\01__fpc_ident" to i8*)], section "llvm.metadata"
  441. @"\01_INIT$_$SYSTEM" = external global i8*, align 8
  442. @"\01_FINALIZE$_$OBJPAS" = external global i8*, align 8
  443. @"\01_INIT$_$UNIX" = external global i8*, align 8
  444. @"\01_FINALIZE$_$UNIX" = external global i8*, align 8
  445. @"\01_SYSUTILS$_$TENCODING_$__$$_create" = external global  void ()*, align 8
  446. @"\01_SYSUTILS$_$TENCODING_$__$$_destroy" = external global  void ()*, align 8
  447. @"\01_INIT$_$SYSUTILS" = external global i8*, align 8
  448. @"\01_FINALIZE$_$SYSUTILS" = external global i8*, align 8
  449. @"\01_THREADVARLIST_$SYSTEM$indirect" = external global i8*, align 8
  450. @"\01_RESSTR_$SYSCONST_$$_START$indirect" = external global i8*, align 8
  451. @"\01_RESSTR_$SYSCONST_$$_END$indirect" = external global i8*, align 8
  452. ; End asmlist al_globals
  453. ; Begin asmlist al_typedconsts
  454. @"\01_$PROGRAM$_Ld1" = unnamed_addr constant [37 x i8] c"#qword multiplication of shift error\00", align 8
  455. @"\01_$PROGRAM$_Ld2" = unnamed_addr constant [48 x i8] c".qword multiplication overflow detection failed\00", align 8
  456. @"\01_$PROGRAM$_Ld3" = unnamed_addr constant [4 x i8] c"\02: \00", align 8
  457. @"\01_$PROGRAM$_Ld4" = unnamed_addr constant [46 x i8] c",false qword multiplication overflow detected\00", align 8
  458. ; End asmlist al_typedconsts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement