eugeniucarvalho 5 years ago
parent
commit
734f6dd078
38 changed files with 930 additions and 590 deletions
  1. BIN
      build/classes/API/Api.class
  2. BIN
      build/classes/Output/Mif.class
  3. BIN
      build/classes/Output/MifFactory.class
  4. BIN
      build/classes/compiler/IVANNOSYS.class
  5. 4 9
      build/classes/samples/program_mult.go
  6. BIN
      build/classes/tools/mips/MipsProcessor.class
  7. BIN
      build/classes/tools/mips/MipsSettings.class
  8. 16 16
      build/classes/tools/mips/memory/md.memory
  9. 154 41
      build/classes/tools/mips/memory/mi.memory
  10. 12 14
      src/API/Api.java
  11. 15 0
      src/API/ExportInterface.java
  12. 63 5
      src/API/TargetGen.java
  13. 1 1
      src/Output/Mif.java
  14. 1 1
      src/Output/MifFactory.java
  15. 17 61
      src/targets/mips/jun/Gen.java
  16. 68 0
      src/Export/Simulation.java
  17. 6 5
      src/Processors/BaseBlockProcessor.java
  18. 2 1
      src/Processors/BlockBaseGroup.java
  19. 3 3
      src/Processors/BlockBaseOcorrences.java
  20. 91 31
      src/Processors/LoadStoreProcessor.java
  21. 2 0
      src/common/Code.java
  22. 4 2
      src/common/Instruction.java
  23. 5 5
      src/common/IvannosysTargetArch.java
  24. 45 15
      src/compiler/IVANNOSYS.java
  25. 25 13
      src/samples/program_jun_bit_count.go
  26. 4 9
      src/samples/program_mult.go
  27. 97 217
      src/targets/mips/Gen.java
  28. 9 1
      src/targets/mips/Mips.java
  29. 5 5
      src/targets/mips/AllocatorMipsProcessor.java
  30. 2 2
      src/targets/mips/CopyDepsProcessor.java
  31. 3 3
      src/targets/mips/LoadStoreProcessor.java
  32. 4 4
      src/targets/mips/OTMinActivationRegister.java
  33. 66 0
      src/targets/mips/MipsOtimizationProcessor.java
  34. 0 25
      src/targets/mips/OtimizationMips.java
  35. 33 7
      src/tools/mips/MipsProcessor.java
  36. 3 37
      src/tools/mips/MipsSettings.java
  37. 16 16
      src/tools/mips/memory/md.memory
  38. 154 41
      src/tools/mips/memory/mi.memory

BIN
build/classes/API/Api.class


BIN
build/classes/Output/Mif.class


BIN
build/classes/Output/MifFactory.class


BIN
build/classes/compiler/IVANNOSYS.class


+ 4 - 9
build/classes/samples/program_mult.go

@@ -1,4 +1,7 @@
-@target: mips, mipt2
+// Aplica o back-end do juninho
+@target          : mips 
+// Especifica o tipo de metodo empregado para salvar o resultado da compilação
+@export          : simulation
 
 package main;
 
@@ -37,14 +40,6 @@ func multiplica() {
 }
 
 func main() {
-    var (
-        x int
-    )
-
-    x = x + 2
-    x = x & 9
-    x = x | 9
     preenche()
     multiplica()
-    return x
 }

BIN
build/classes/tools/mips/MipsProcessor.class


BIN
build/classes/tools/mips/MipsSettings.class


+ 16 - 16
build/classes/tools/mips/memory/md.memory

@@ -1,15 +1,15 @@
-0000:	0
-0004:	0
-0008:	0
-0012:	0
-0016:	0
-0020:	0
-0024:	0
-0028:	0
-0032:	0
-0036:	0
-0040:	0
-0044:	0
+0000:	1
+0004:	2
+0008:	3
+0012:	4
+0016:	1
+0020:	2
+0024:	3
+0028:	4
+0032:	7
+0036:	10
+0040:	15
+0044:	22
 0048:	0
 0052:	0
 0056:	0
@@ -4090,7 +4090,7 @@
 16356:	0
 16360:	0
 16364:	0
-16368:	7
-16372:	0
-16376:	10033
-16380:	10033
+16368:	0
+16372:	2
+16376:	2
+16380:	2

+ 154 - 41
build/classes/tools/mips/memory/mi.memory

@@ -1,54 +1,167 @@
+0201326597
+0000000000
+0201326663
+0000000000
+4294967295
 0666763252
 0001962017
-0605028352
+0605028353
 2949644288
-0605103921
+0605093888
 2949709828
+0134217790
+0000000000
 0605159424
 2949775368
-0134217750
+0134217780
+0000000000
 2412969988
-0001253409
-0201326621
-0000153633
-2413035520
-0042704929
-2949906432
-2413101060
-0649396226
-2949971972
-2413166600
-0651558913
-2950037512
-2413232136
-0604897290
-0049156131
-0071368687
-2412773376
-0001052705
-4294967295
-0666763256
+0000000000
+0001267745
+0000745536
+2413035528
+0000000000
+0001337377
+0026042401
+0000815232
+2413101056
+0000000000
+0059666465
+2916417536
+2412969988
+0000000000
+0001275937
+0001032256
+2413035528
+0000000000
+0001327137
+0050905121
+0001591424
+2413101056
+0000000000
+0059328545
+2905931792
+0000000000
+2413101056
+0000000000
+0649396225
+2949971968
+2413035528
+0000000000
+0647233537
+2949906440
+2412773384
+0000000000
+0604831746
+0034410531
+0071368664
+0000000000
+2412838916
+0000000000
+0640745473
+2949709828
+2412904452
+0000000000
+0604897282
+0038670371
+0071368650
+0000000000
+0666697740
+0001962017
+0065011720
+0666763248
 0001962017
-2948857856
+0605028352
+2949644288
 0605093888
 2949709828
-2412773376
-0033558563
-0406847500
-2412904452
-0642908161
-2949775364
-2412969984
-0604700673
-0040591395
-2412969984
-0040671268
-2949840896
-2412969984
-0308281345
-0134217765
+0134217886
+0000000000
+0605159424
+2949775368
+0134217876
+0000000000
+0605224960
+2949840908
+0134217851
+0000000000
 2413035524
-0001314849
-0666697736
+0000000000
+0001335329
+0000813120
+2413101068
+0000000000
+0001404961
+0028207137
+0000882816
+0059734049
+2381709312
+0000000000
+0001490977
+2413101068
+0000000000
+0001392673
+0000542784
+2413232136
+0000000000
+0001527841
+0019548193
+0000612480
+0059463713
+2372927504
+0000000000
+0001073185
+0051146776
+0000028690
+2412838912
+0000000000
+0036603937
+2949709824
+2413101068
+0000000000
+0649396225
+2949971980
+2412904460
+0000000000
+0604962818
+0038735907
+0071368663
+0000000000
+2412969988
+0000000000
+0001261601
+0000544832
+2413035528
+0000000000
+0001329185
+0021581857
+0000678016
+2413166592
+0000000000
+0059463713
+2910191648
+0605421568
+2950037504
+2413035528
+0000000000
+0647233537
+2949906440
+2412773384
+0000000000
+0604897282
+0034476067
+0071368634
+0000000000
+2412838916
+0000000000
+0640745473
+2949709828
+2413101060
+0000000000
+0604962818
+0045027363
+0071368620
+0000000000
+0666697744
 0001962017
 0065011720

+ 12 - 14
src/API/Api.java

@@ -6,7 +6,6 @@
 package API;
 
 import IntermediaryCode.Allocation;
-import Processors.BaseBlockProcessor;
 import ast.Node;
 import compiler.IvannosysCompiler;
 import java.util.ArrayList;
@@ -76,18 +75,17 @@ public class Api {
         );
 
         // Registra os processadores de codigo padrão
-        BaseBlockProcessor bb = new Processors.BaseBlockProcessor();
         CodeProcessor.Add("ir.clear.labels", new Processors.RemoveUnusedLabelsProcessor());
-        CodeProcessor.Add("ir.basic.blocks", bb);
-        CodeProcessor.Add("ir.o.load_store", new Processors.LoadStoreProcessor(bb));
-        //                     CodeProcessor.Add("ir.o.VariablesConstants", new Processors.VariablesConstantsProcessor());
-        //                     CodeProcessor.Add("ir.o.DeadInstructions", new Processors.DeadInstructionsProcessor());
+        CodeProcessor.Add("ir.basic.blocks", new Processors.BasicBlockProcessor());
+        CodeProcessor.Add("ir.o.load_store", new Processors.LoadStoreProcessor());
+        CodeProcessor.Add("ir.o.VariablesConstants", new Processors.VariablesConstantsProcessor());
+        CodeProcessor.Add("ir.o.DeadInstructions", new Processors.DeadInstructionsProcessor());
         CodeProcessor.Add("ir.o.copies", new Processors.CodeOtimizadorProcessor(true));
 
         // Processadores do alvo mips
-        CodeProcessor.Add("mips.copy.dep", new targets.mips.CopyDepsProcessor());
-        CodeProcessor.Add("mips.register.alloc", new targets.mips.AllocatorMipsProcessor());
-        CodeProcessor.Add("mips.o.L1", new targets.mips.OtimizationMips());
+        CodeProcessor.Add("mips.copy.dep", new targets.mips.MipsCopyDepsProcessor());
+        CodeProcessor.Add("mips.register.alloc", new targets.mips.MipsAllocatorProcessor());
+        CodeProcessor.Add("mips.o.L1", new targets.mips.MipsOtimizationProcessor());
         CodeProcessor.Add("mips.update.address", new targets.mips.MipsUpdateAddressProcessor());
 
         // Define os processadores padrão da IR
@@ -98,14 +96,14 @@ public class Api {
                 "ir.clear.labels,"
                 // Remove copias
                 + "ir.o.copies,"
+                // Propagacao de constantes
+                //                + "ir.o.VariablesConstants,"
+                // Remove instruções que não tem impacto algum na execusao
+                //                + "ir.o.DeadInstructions,"
                 // Extrai os blocos basicos de uma subrotina
                 + "ir.basic.blocks,"
                 // Remove loads e stores desnecessarios
-                + "ir.o.load_store"
-                // Remove variaveis que são escrias apenas uma vez. Transformando em constantes
-        // + "ir.o.VariablesConstants,"
-        //                // Remove instrucoes mortas
-        // + "ir.ot.DeadInstructions,"
+//                + "ir.o.load_store"
         );
 
         Imports._init(compiler);

+ 15 - 0
src/API/ExportInterface.java

@@ -0,0 +1,15 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package API;
+
+/**
+ *
+ * @author EUGENIO CARVALHO
+ */
+public interface ExportInterface {
+
+    public void Exec(common.Code IR, common.Code Target) throws Exception;
+}

+ 63 - 5
src/API/TargetGen.java

@@ -9,7 +9,11 @@ import common.Block;
 import common.Code;
 import common.Instruction;
 import common.IvannosysTargetArch;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.Map;
+import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -19,8 +23,10 @@ import java.util.logging.Logger;
  */
 public abstract class TargetGen implements IvannosysTargetArch {
 
+    protected HashMap<String, ExportInterface> exportMethods = new HashMap<>();
     protected Code target;
     protected Code IR;
+    protected Instruction prev = null, next = null;
 
     public TargetGen(String id) {
         BaseGenInit(id);
@@ -42,10 +48,33 @@ public abstract class TargetGen implements IvannosysTargetArch {
         return IR;
     }
 
-//    public void setTac(Code IR) {
-//        this.IR = IR;
-//    }
-    public IvannosysTargetArch SetTAC(Code tac) {
+    public ExportInterface GetExportMethod(String id) throws Exception {
+        id = id.trim();
+        if (!exportMethods.containsKey(id)) {
+            Set<String> set = exportMethods.keySet();
+            String[] valids = new String[set.size()];
+            set.toArray(valids);
+            throw new Exception(String.format(
+                    "O método de exportação '%s' não foi definido no alvo '%s'. Métodos disponiveis: %s",
+                    id,
+                    target.Name(),
+                    Utils.Join(valids, ", ")));
+        }
+        return exportMethods.get(id);
+    }
+
+    public HashMap<String, ExportInterface> GetExportMethods() {
+        return exportMethods;
+    }
+
+    public IvannosysTargetArch SetTAC(Code tac) throws Exception {
+        // Verifica se o codigo gerado vai ser util caso contrario aborta o processo;
+        ArrayList<String> methods = BuildParams.Get("export");
+
+        if (methods.isEmpty()) {
+            throw new Exception(String.format("Nenhum método de exportação definido para o alvo '%s'", target.Name()));
+        }
+
         IR = tac;
         target.GData().copy(tac.GData());
         target.Parent = IR;
@@ -57,6 +86,11 @@ public abstract class TargetGen implements IvannosysTargetArch {
         return inst;
     }
 
+    public TargetGen AddExportOption(String id, ExportInterface exp) {
+        exportMethods.put(id.trim(), exp);
+        return this;
+    }
+
     @Override
     public IvannosysTargetArch Format() {
         try {
@@ -112,10 +146,24 @@ public abstract class TargetGen implements IvannosysTargetArch {
         CodeProcessor.Trigger(target, targetID, "AfterTranslate");
     }
 
+    @Override
+    public IvannosysTargetArch Export() throws Exception {
+        ArrayList<String> methods = BuildParams.Get("export");
+
+        for (String method : methods) {
+            GetExportMethod(method).Exec(IR, target);
+        }
+        return this;
+    }
+
     protected void TranslateBlock(Block b) throws Exception {
 //        System.out.println("Translate block:" + b.getName() + "::" + b.Instructions().size());
+        LinkedList<Instruction> instructions = b.Instructions();
+        Integer index = 0, limit = instructions.size(), nextIndex;
+        for (Instruction inst : instructions) {
+            nextIndex = index + 1;
+            next = (nextIndex < limit) ? instructions.get(nextIndex) : null;
 
-        for (Instruction inst : b.Instructions()) {
 //            System.out.println("Translate: " + inst.G("global.position") + "::read["
 //                    + inst.G("reg.dst.load")
 //                    + "|"
@@ -186,7 +234,17 @@ public abstract class TargetGen implements IvannosysTargetArch {
                 default:
                     throw new Exception(String.format("TAC instruction type '%s' not defined", inst.G("type")));
             }
+            prev = inst;
+            index++;
         }
     }
 
+    protected Instruction Next() {
+        return next;
+    }
+
+    protected Instruction Prev() {
+        return prev;
+    }
+
 }

+ 1 - 1
src/Output/Mif.java

@@ -3,7 +3,7 @@
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-package Output;
+package Export;
 
 import API.Api;
 import common.Instruction;

+ 1 - 1
src/Output/MifFactory.java

@@ -3,7 +3,7 @@
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-package Output;
+package Export;
 
 import API.Api;
 import API.Traps;

+ 17 - 61
src/targets/mips/jun/Gen.java

@@ -3,14 +3,14 @@
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-package targets.mips.jun;
+package Export;
 
 import API.BuildParams;
+import API.ExportInterface;
 import API.Utils;
 import common.Block;
 import common.Code;
 import common.Instruction;
-import common.IvannosysTargetArch;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -21,27 +21,27 @@ import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import targets.mips.Mips;
+import targets.mips.MipsUpdateAddressProcessor;
 import targets.mips.Registers;
 import targets.mips.TemplateMips;
-import targets.mips.MipsUpdateAddressProcessor;
 
 /**
  * MipS tranSlation
  *
  * @author EUGENIO CARVALHO
  */
-public class Gen extends targets.mips.Gen {
+public class MultCoreJun implements ExportInterface {
 
-    public Gen() {
-        super();
-    }
+    private Code target;
 
     @Override
-    public IvannosysTargetArch Export() {
+    public void Exec(Code IR, Code Target) throws Exception {
+
         try {
-            Code Target = getTarget(), newCode;
+            this.target = Target;
+
+            Code newCode;
             System.out.println("Export MIPSJUN");
-//            System.out.println("Data:" + Target.GData());
 
             Long stackBaseAddress = 0L,
                     updateBaseAddress = 0L,
@@ -51,8 +51,8 @@ public class Gen extends targets.mips.Gen {
                     initFunction,
                     blockName,
                     format,
-                    cacheBlockSize = BuildParams.Get("cacheBlockSize").get(0),
-                    base = BuildParams.Get("outputDirectory").get(0);
+                    cacheBlockSize = BuildParams.GetFirst("cacheBlockSize"),
+                    base = BuildParams.GetFirst("outputDirectory");
             String[] parts;
 
             Block func;
@@ -116,56 +116,12 @@ public class Gen extends targets.mips.Gen {
             }
 
 //        } catch (ParseException ex) {
-//            Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
+//            Logger.getLogger(MultCoreJun.class.getName()).log(Level.SEVERE, null, ex);
         } catch (Exception ex) {
-            Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
+            Logger.getLogger(MultCoreJun.class.getName()).log(Level.SEVERE, null, ex);
         }
-        return this;
-//        return super.Export(); //To change body of generated methods, choose Tools | Templates.
     }
 
-//    protected void ExecuteCode(Code c) {
-//        try {
-//            String out = "", tmp;
-//            for (Map.Entry<String, Block> x : c.stmts.entrySet()) {
-////                System.out.println(x.getValue().Data());
-//                for (Instruction instr : x.getValue().Instructions()) {
-//                    tmp = instr.G("inst.dec");
-//                    if (tmp.equals("")) {
-//                        continue;
-//                    }
-//                    out = out.concat(tmp + "\n");
-//                }
-//            }
-//
-//            Utils.WriteFile("\\src\\tools\\mips\\memory\\mi2.memory", out);
-//
-//            out = "";
-//            for (int i = 0, y = 0; i < 2; i++) {
-//                for (int j = 1; j <= 400; j++, y += 4) {
-//                    out = out.concat(y + ":" + j + "\n");
-//                }
-//            }
-//
-//            Utils.WriteFile("\\src\\tools\\mips\\memory\\md2.memory", out);
-//
-//            MipsProcessor sim = new tools.mips.MipsProcessor(new tools.mips.MipsSettings() {
-//                {
-//                    debugmode = true;
-////                    stepByStep = true;
-//                    SetInstructionMemoryFile("\\src\\tools\\mips\\memory\\mi2.memory");
-//                    SetDataMemoryFile("\\src\\tools\\mips\\memory\\md2.memory");
-//                }
-//            });
-//
-//            sim.SetBreak("5c,84,c8")
-//                    .Run()
-//                    .Persist();
-//
-//        } catch (Exception ex) {
-//            Logger.getLogger(target.mips.Gen.class.getName()).log(Level.SEVERE, null, ex);
-//        }
-//    }
     protected Long fixCacheBlockSize(Long size, Long sizeOfBlock) {
         Long t = sizeOfBlock;
         while (true) {
@@ -242,7 +198,7 @@ public class Gen extends targets.mips.Gen {
         newCode.CloseBlock();
 
         // Adiciona as funcoes que geram dependencias 
-        HashMap<String, Block> tb = getTarget().getBlocks();
+        HashMap<String, Block> tb = target.getBlocks();
         ArrayList<String> deps = tb.get(blockName).GetDependences();
 
         if (!deps.isEmpty()) {
@@ -257,11 +213,11 @@ public class Gen extends targets.mips.Gen {
     protected Code NewCode(String id) {
         return new Code(id)
                 .Template(new TemplateMips())
-                .Formats(formatMips);
+                .Formats(targets.mips.Gen.formatMips);
     }
 
     protected Long MaxStackSize(Block blk) {
-        HashMap<String, Block> tb = getTarget().getBlocks();
+        HashMap<String, Block> tb = target.getBlocks();
         int size = blk.Data().Size();
 //        System.out.println("data:" + blk.Data());
         Long childSize = 0L, tmpChildSize;

+ 68 - 0
src/Export/Simulation.java

@@ -0,0 +1,68 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package Export;
+
+import API.ExportInterface;
+import API.Utils;
+import common.Block;
+import common.Code;
+import common.Instruction;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import targets.mips.Gen;
+import tools.mips.MipsSettings;
+
+/**
+ *
+ * @author EUGENIO CARVALHO
+ */
+public class Simulation implements ExportInterface {
+
+    protected MipsSettings settings;
+
+    public Simulation(tools.mips.MipsSettings settings) {
+        this.settings = settings;
+
+    }
+
+    @Override
+    public void Exec(Code IR, Code Target) throws Exception {
+//        Integer index;
+//        System.out.println(Target.GData());
+        String tmp, out = "";
+
+        for (Map.Entry<String, Block> x : Target.stmts.entrySet()) {
+//            System.out.println(x.getValue().Data());
+//            index = 0;
+            for (Instruction instr : x.getValue().Instructions()) {
+                tmp = instr.G("inst.dec");
+                if (tmp.equals("")) {
+                    continue;
+                }
+                out = out.concat(tmp + "\n");
+                //                        .concat(Integer.toHexString(index))
+                //                        .concat(":")
+                //                        .concat(String.format("%X\n", tmp.trim()) + "\n");
+//                index++;
+            }
+        }
+
+//        Utils.WriteFile("\\src\\tools\\mips\\memory\\mi.memory", out);
+        try {
+            // Grava resutlado no arquivo de memoria do simulador
+            Utils.WriteFile(settings.G("memory.instruction"), out);
+
+            new tools.mips.MipsProcessor(settings)
+                    .Run()
+                    .Persist();
+
+        } catch (Exception ex) {
+            Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+}

+ 6 - 5
src/Processors/BaseBlockProcessor.java

@@ -5,8 +5,8 @@ package Processors;
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-import API.Utils;
 import API.CodeProcessorInterface;
+import API.Utils;
 import common.Code;
 import common.Instruction;
 import java.util.ArrayList;
@@ -20,7 +20,7 @@ import java.util.regex.Pattern;
  *
  * @author EUGENIO CARVALHO
  */
-public class BaseBlockProcessor implements CodeProcessorInterface {
+public class BasicBlockProcessor implements CodeProcessorInterface {
 
 //    protected LinkedHashMap<String, ArrayList<ArrayList<Integer>>> basicBlocks = new LinkedHashMap<>();
 //    protected String basicBlockName;
@@ -36,7 +36,8 @@ public class BaseBlockProcessor implements CodeProcessorInterface {
     public static Pattern addresspattern = Pattern.compile("\\_[VTGC].*", Pattern.CASE_INSENSITIVE);
     private ArrayList<Integer> leadersList;
 
-    public BaseBlockProcessor() {
+    public BasicBlockProcessor() {
+
     }
 
     public BlockBaseGroup getBasicBlockGroup(String id) {
@@ -67,7 +68,7 @@ public class BaseBlockProcessor implements CodeProcessorInterface {
     }
 
     public static void setAddresspattern(Pattern addresspattern) {
-        BaseBlockProcessor.addresspattern = addresspattern;
+        BasicBlockProcessor.addresspattern = addresspattern;
     }
 
 //    protected void IncrementBasicBlockCount() {
@@ -132,7 +133,7 @@ public class BaseBlockProcessor implements CodeProcessorInterface {
         // reseta a posicao da instrução
         instructionPosition = 0;
 //        System.out.println("basicBlock:::::::::::::" + leaders);
-        leadersList = new ArrayList<Integer>();
+        leadersList = new ArrayList<>();
 
         for (Map.Entry<Integer, Integer> entry : leaders.entrySet()) {
             leadersList.add(entry.getKey());

+ 2 - 1
src/Processors/BlockBaseGroup.java

@@ -24,7 +24,8 @@ public class BlockBaseGroup {
     }
 
     public void Init() {
-        current = bbs.get(0);
+        currentIndex = 0;
+        current = bbs.get(currentIndex);
     }
 
     public boolean NextBlock() {

+ 3 - 3
src/Processors/BlockBaseOcorrences.java

@@ -5,7 +5,7 @@
  */
 package Processors;
 
-import Processors.BaseBlockProcessor;
+import Processors.BasicBlockProcessor;
 import API.Utils;
 import common.Instruction;
 import java.util.ArrayList;
@@ -97,7 +97,7 @@ public class BlockBaseOcorrences {
 
     void Register(Instruction x, String attr) {
         String alias = x.G(attr);
-        if (!BaseBlockProcessor.IsAddress(alias)) {
+        if (!BasicBlockProcessor.IsAddress(alias)) {
             return;
         }
         alias = ToAliase(x, attr);
@@ -255,7 +255,7 @@ public class BlockBaseOcorrences {
 
 //    protected void Register(Instruction x, String attr) {
 //        String alias = x.G(attr);
-//        if (!BaseBlockProcessor.IsAddress(alias)) {
+//        if (!BasicBlockProcessor.IsAddress(alias)) {
 //            return;
 //        }
 //        alias = ToAliase(x, attr);

+ 91 - 31
src/Processors/LoadStoreProcessor.java

@@ -6,8 +6,13 @@
 package Processors;
 
 import API.CodeProcessorInterface;
+import common.Block;
 import common.Code;
+import common.Instruction;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.LinkedList;
 
 /**
  *
@@ -15,45 +20,100 @@ import java.util.LinkedHashMap;
  */
 public class LoadStoreProcessor implements CodeProcessorInterface {
 
-    protected BaseBlockProcessor basicBlocks;
+    protected BasicBlockProcessor basicBlocks;
+
     private BlockBaseGroup group;
 
     public LoadStoreProcessor() {
     }
 
-    public LoadStoreProcessor(BaseBlockProcessor bb) {
-        this.basicBlocks = bb;
-    }
-
     @Override
     public void Exec(Code c, LinkedHashMap<String, CodeProcessorInterface> cp) throws Exception {
-//        BlockBaseOcorrences g;
-//        Integer leader, limit, lposition;
-//        group = basicBlocks.getGroups().get(c.Block().getName());
-//        group.Init();
-//
-//        while (true) {
-//            g = group.getCurrent();
-//            if (g == null) {
-//                break;
-//            }
-//            leader = g.getLeader();
-//            limit = leader + g.Position;
-//
-//            System.out.println("LoadStoreProcessor:[" + leader + "][" + limit + "]");
-//
-//            for (int i = leader; i < limit; i++) {
-//
-//            }
-//
-//            if (group.getBasicBlocks(1) == null) {
-//                break;
-//            }
-//            group.NextBlock();
-//        }
-//
-//        System.out.println("groupgroupgroupgroupgroup:" + group);
+        this.basicBlocks = (BasicBlockProcessor) cp.get("ir.basic.blocks");
+        
+        BlockBaseOcorrences g;
+        Integer leader, limit, lposition;
+        Block block = c.Block();
+        String blockname = block.getName();
+        LinkedList<Instruction> instructions = block.Instructions();
+        ArrayList<Instruction> remove = new ArrayList<>();
+        Instruction IL, IS;
+        // Group contem a lista de blocos basicos do bloco atual
+        group = basicBlocks.getGroups().get(blockname);
+        HashMap<String, Boolean> loaded, stored;
+        String varL, varS;
+        Integer fix = 0;
+        group.Init();
+
+        System.out.println("Inicianado load store processor....");
+
+        while (true) {
+            g = group.getCurrent();
+
+            if (g == null) {
+                break;
+            }
+            System.out.println("------------------------------>:" + g);
+
+            // Corrige o endereco inicial do leader caso alguma instrucao tenha sido removida
+            leader = g.getLeader() - fix;
+
+            limit = leader + g.Position;
+
+            System.out.println("LoadStoreProcessor:[" + leader + "][" + limit + "]");
+
+            loaded = new HashMap<>();
+            stored = new HashMap<>();
+
+            for (int i = leader, j = limit - 1; i < limit; i++, j--) {
+                IL = instructions.get(i);
+                IS = instructions.get(j);
+
+                varL = IL.G("p1");
+                varS = IS.G("p1");
+                // Verifica a possibilidade de remover a instrucao atual considerando:
+                // * A instrucao é um load
+                // * O endereco carregado é uma variavel da pilha
+                // Variaveis globais sempre são lidas
+
+                if (IL.eq("type", "load") && varL.contains("_V")) {
+//                    System.out.println("Looad:" + instruction);
+                    if (loaded.containsKey(varL)) {
+                        remove.add(IL);
+                        fix++;
+                    } else {
+                        loaded.put(varL, Boolean.TRUE);
+                    }
+                }
+
+                // Verifica a possibilidade de remover a instrucao atual considerando:
+                // * A instrucao é um store
+                // * O endereco carregado é uma variavel da pilha
+                // Variaveis globais sempre são gravadas
+                if (IS.eq("type", "store") && varS.contains("_V")) {
+//                    System.out.println("Looad:" + instruction);
+                    if (stored.containsKey(varS)) {
+                        remove.add(IS);
+                        fix++;
+                    } else {
+                        stored.put(varS, Boolean.TRUE);
+                    }
+                }
+            }
+            // Corrige o endereco final do bloco caso alguma instrucao tenha sido removida
+            g.setLeader(leader);
+            g.Position -= fix;
+
+            System.out.println("------------------------------<:" + g);
+
+            if (!group.NextBlock()) {
+                break;
+            }
+        }
 
+        for (Instruction i : remove) {
+            instructions.remove(i);
+        }
     }
 
 }

+ 2 - 0
src/common/Code.java

@@ -51,6 +51,8 @@ public class Code {
 //    private ArrayList<CodeProcessing> processing = new ArrayList<>();
     public Code Parent;
 
+    protected HashMap<Integer, Integer> leaders = new HashMap<>();
+
     public Code(String id, AbstractSyntaxTree arvore) {
         name = id;
         ast = arvore;

+ 4 - 2
src/common/Instruction.java

@@ -5,7 +5,6 @@
  */
 package common;
 
-import common.RegistroBase;
 import java.util.Map;
 
 /**
@@ -100,7 +99,10 @@ public class Instruction extends RegistroBase {
     public Instruction copy(String atrib, Instruction r) {
         if (r != null) {
             for (String a : atrib.split(",")) {
-                this.S(a, r.G(a));
+                a = a.trim();
+                if (r.Has(a)) {
+                    this.S(a, r.G(a));
+                }
             }
         }
         return this;

+ 5 - 5
src/common/IvannosysTargetArch.java

@@ -12,17 +12,17 @@ package common;
  */
 public interface IvannosysTargetArch {
 
-    public void Init();
+    public void Init() throws Exception;
 
-    public IvannosysTargetArch SetTAC(Code tac);
+    public IvannosysTargetArch SetTAC(Code tac) throws Exception;
 
-    public IvannosysTargetArch Compile();
+    public IvannosysTargetArch Compile() throws Exception;
 
-    public IvannosysTargetArch Format();
+    public IvannosysTargetArch Format() throws Exception;
 
     // Export gera a representacao fisica do codigo
     // Sua funcao é gerar o(s) arquivo(s) de saida
-    public IvannosysTargetArch Export();
+    public IvannosysTargetArch Export() throws Exception;
     // Metodos de traduzir tac para target
 
     public void Prolog(String id) throws Exception;

+ 45 - 15
src/compiler/IVANNOSYS.java

@@ -10,9 +10,12 @@ import API.Api;
 import API.BuildParams;
 import API.CodeProcessor;
 import API.Target;
+import Export.MultCoreJun;
+import Export.Simulation;
 import IntermediaryCode.IRGenerator;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import targets.mips.Gen;
 
 /**
  *
@@ -44,9 +47,9 @@ public class IVANNOSYS {
                             IvannosysCompiler.INPUT_FILE)
                             .include(".\\src\\samples")
                             // Especifica a classe de geração de codigo de tres enderecos
-                            .IRGenerator(new IRGenerator())
+                            .IRGenerator(new IRGenerator());
                             // Extensao dos arquivos 
-                            .setExtensionLibrary(".go");
+//                            .setExtensionLibrary(".go");
 
                     // Inicializa a api do compilador
                     Api.Init(COM);
@@ -57,23 +60,50 @@ public class IVANNOSYS {
                     BuildParams.Add("display.AST", "true");
                     BuildParams.Add("mode", "developement");
 
-                    // Especifica a classe de geração de codigo alvo mips
-                    Target.Add("mips", new targets.mips.Gen());
-                    Target.Add("mipsjun", new targets.mips.jun.Gen());
+                    // Especifica a classe de geração de código alvo mips
+                    Gen Mips = new targets.mips.Gen();
+                    // Adiciona dois metodos de exportação ao alvo mips 
+                    // Metodo de simualcao
+                    Mips.AddExportOption("simulation", new Simulation(new tools.mips.MipsSettings() {
+                        {
+                            // Não executar passo a passo
+                            S("stepByStep", "false");
+                            // Necessario para poder usar os breakpoints
+                            S("mode", "debug");
+                            // Determina os pontos de para no codigo alvo
+                            S("breakpoints", "10,11c");
+                            // Caminho do arquivo de memoria de instrucoes
+                            S("memory.instruction", "\\src\\tools\\mips\\memory\\mi.memory");
+                            // Tamanho da memorua de instrucoes
+                            S("memory.instruction.size", 16 * 1024);
+                            // Caminho do arquivo de memoria de dados
+                            S("memory.data", "\\src\\tools\\mips\\memory\\md.memory");
+                            // Tamanho da memorua de dados
+                            S("memory.data.size", 16 * 1024);
+
+                        }
+                    }));
+
+                    // Metodo exporta profile para arquitetura de juninho
+                    Mips.AddExportOption("MultCoreJun", new MultCoreJun());
+
+                    Target.Add("mips", Mips);
 
                     // Registra os processadores para o alvo mips
                     // Executa alocacao de registradores antes de traduzir cada bloco
-                    CodeProcessor.On("mips,mipsjun", "BeforeTranslateBlock", "mips.register.alloc");
-                    CodeProcessor.On("mips,mipsjun", "AfterTranslateBlock", "mips.o.L1,mips.copy.dep");
+                    CodeProcessor.On("mips", "BeforeTranslateBlock", "mips.register.alloc");
+                    CodeProcessor.On("mips", "AfterTranslateBlock", "mips.o.L1,mips.copy.dep");
                     // Atualiza os enderecos
-                    CodeProcessor.On("mips,mipsjun", "AfterTranslate", "mips.update.address");
-
-                    // String file = "src\\samples\\program.go",
-                    // String file = "src\\samples\\program.go",
-                    // String file = "src\\samples\\program_mult_manycore.go",
-                    // String file = "src\\samples\\program_mult_jon.go",
-                    // String file = "src\\samples\\program_mult.go",
-                    file = "src\\samples\\program_jun_bit_count.go";
+                    CodeProcessor.On("mips", "AfterTranslate", "mips.update.address");
+
+                    // file = "src\\samples\\program.go";
+                    // file = "src\\samples\\program.go";
+                    // file = "src\\samples\\program_mult_manycore.go";
+                    // file = "src\\samples\\program_mult_jon.go";
+                    file = "src\\samples\\program_mult.go";
+//                    file = "src\\samples\\program_jun_bit_count.go";
+
+                    // Compila o arquivo de entrada
                     COM.Compile(file);
             }
 

+ 25 - 13
src/samples/program_jun_bit_count.go

@@ -1,5 +1,7 @@
 // Aplica o back-end do juninho
 @target          : mips 
+// Especifica o tipo de metodo empregado para salvar o resultado da compilação
+@export          : MultCoreJun
 
 // Diretorio onde o resultado da compilação será gravado
 @outputDirectory : `C:\Users\EUGENIO CARVALHO\Desktop\tmp\comp`
@@ -22,8 +24,23 @@
 @profile: `[
     {
         "id"               : "core0",
-        "initFunction"     : "main()",
+        "initFunction"     : "bitCount(0)",
         "filename"         : "%s_core_0.txt"
+    },
+    {
+        "id"               : "core1",
+        "initFunction"     : "bitCount(18750)",
+        "filename"         : "%s_core_1.txt"
+    },
+    {
+        "id"               : "core2",
+        "initFunction"     : "bitCount(37500)",
+        "filename"         : "%s_core_2.txt"
+    },
+    {
+        "id"               : "core3",
+        "initFunction"     : "bitCount(56250)",
+        "filename"         : "%s_core_3.txt"
     }
 ]`
 
@@ -31,35 +48,29 @@
 
 package main;
 
+var result = 0
 
-/*
-**  Bit counter by Ratko Tomic
-**  Optimized 1 bit/loop counter
-**  Esta versão é a input small, com 75000 interações
-*/
 func bitCount(x int) int {
     n := 0
-/*
-** The loop will execute once for each bit of x set, this is in average
-** twice as fast as the shift/test method.
-*/
+    
     if x > 0 {
         for {
             n++
-            
             if x = x & (x-1); x == 0 {
                     break
             }
         }
     }
+    result += n
     return n
 }
 
+/**
+
 func main(){
     var (
 	n     = 0
 	seed  = 10033
-	//seed2 int = 112500
     )
     
     for i := 0; i < 10; i++ {
@@ -70,4 +81,5 @@ func main(){
     }
 
     return n
-}
+}
+*/

+ 4 - 9
src/samples/program_mult.go

@@ -1,4 +1,7 @@
-@target: mips, mipt2
+// Aplica o back-end do juninho
+@target          : mips 
+// Especifica o tipo de metodo empregado para salvar o resultado da compilação
+@export          : simulation
 
 package main;
 
@@ -37,14 +40,6 @@ func multiplica() {
 }
 
 func main() {
-    var (
-        x int
-    )
-
-    x = x + 2
-    x = x & 9
-    x = x | 9
     preenche()
     multiplica()
-    return x
 }

+ 97 - 217
src/targets/mips/Gen.java

@@ -5,9 +5,7 @@
  */
 package targets.mips;
 
-import API.Utils;
 import ast.Node;
-import common.Block;
 import common.Code;
 import common.DataFrame;
 import common.Instruction;
@@ -31,7 +29,7 @@ public class Gen extends API.TargetGen {
 
     protected HashMap<String, String> AddressCalculated = new HashMap<>();
 //    protected AllocatorMipsProcessor allocation = new AllocatorMipsProcessor();
-    protected HashMap<String, String> formatMips = new HashMap<String, String>() {
+    public static HashMap<String, String> formatMips = new HashMap<String, String>() {
         {
             String base = "{[HEX(global.position,_addressLen,' ')]':  '}{[INSTDEC()]}{[T(1)]}{[inst]}' '",
                     //            String base = "{[HEX(global.position,_addressLen,' ')]':  '}{[INSTHEX()]}{[T(1)]}{[inst]}' '",
@@ -76,7 +74,6 @@ public class Gen extends API.TargetGen {
 
     public Gen() {
         super("mips");
-
     }
 
     public void Init() {
@@ -99,37 +96,21 @@ public class Gen extends API.TargetGen {
 
     @Override
     public void TranslateLabel(Instruction inst) {
+
         Add(new Instruction()
                 .S("type", "label")
                 .S("format", "norender")
                 .S("tac.position", inst.G("block.position"))
                 .S("label", inst.G("label")));
+
         getTarget().RegisterLabelAddress(inst.G("label"));
     }
 
     @Override
     public void TranslateCopy(Instruction inst) throws Exception {
-
-        //Se o valor deve ser armazenado em memoria
-//        String regDst = inst.G("reg.dst");
-//        System.out.println("COPY:::::::::::" + inst);
-//        if (inst.eq("reg.dst.store", "true")) {
-//
-////            System.out.println("::" + inst);
-//            inst.S("reg.p1", regDst);
-//            String dst = inst.G("dst");
-//            LoadParam(inst, "p1");
-////            StoreWord(inst.G("reg.p1"),
-//            StoreWord(regDst,
-//                    GlobalOrFrameRegister(dst),
-//                    getTarget().Block().Data().Offset(dst))
-//                    .S("tac.position", inst.G("block.position"))
-//                    .S("comment", "store content of " + inst.G("reg.p1") + " in " + dst);
-//        } else {
         Copy(inst, inst.G("reg.dst"))
                 .S("tac.position", inst.G("block.position"))
                 .S("comment", "copy " + inst.G("dst") + " ← " + inst.G("p1"));
-//        }
     }
 
     @Override
@@ -149,8 +130,10 @@ public class Gen extends API.TargetGen {
 //                System.out.println("Assign:" + inst);
 
                 if (inst.eq("p2value", "true")) {
+                    String op = inst.G("op");
+
                     LoadParam(inst, "p1");
-                    ninst.S("offset", inst.G("p2"))
+                    ninst.S("offset", (op.equals("-") ? "-" : "") + inst.G("p2"))
                             .S("rs", inst.G("reg.p1"));
                 } else {
                     LoadParam(inst, "p2");
@@ -190,20 +173,18 @@ public class Gen extends API.TargetGen {
                     .S("tac.position", inst.G("block.position"))
             );
         }
-
-        // Gravar na memoria?
-//        System.out.println("ASSIGN:" + inst);
-        StoreResult(inst, rd, dst);
+//        StoreResult(inst, rd, dst);
     }
 
     @Override
-    public void TranslateJump(Instruction inst) {
+    public void TranslateJump(Instruction inst) throws Exception {
         Add(new Instruction("J", "j")
                 .copy("label", inst)
                 .S("comment", inst.getText())
                 .S("tac.position", inst.G("block.position"))
         );
-        Noop();
+
+        AddNop();
     }
 
     @Override
@@ -242,6 +223,7 @@ public class Gen extends API.TargetGen {
         // Restaura o array de registradores de retorno para fazer o pop dos returns
         ResetReturnArgs();
 
+        AddNop();
     }
 
     @Override
@@ -287,7 +269,7 @@ public class Gen extends API.TargetGen {
                 CopyReg(reg, inst.G("reg.p1"));
             } else {
                 StoreWord(reg,
-                        GlobalOrFrameRegister(p1),
+                        FrameRegister(p1),
                         getTarget().Block().Data().Offset(p1));
             }
 
@@ -307,7 +289,7 @@ public class Gen extends API.TargetGen {
 //        System.out.println("PopParams:" + inst);
             int offset = getTarget().Block().Data().Offset(p1);
             StoreWord(returnRegisters.remove(2),
-                    GlobalOrFrameRegister(p1),
+                    FrameRegister(p1),
                     offset)
                     .S("tac.position", inst.G("block.position"))
                     .S("comment", "pop param");
@@ -358,8 +340,12 @@ public class Gen extends API.TargetGen {
                 .S("tac.position", inst.G("block.position"))
                 .S("comment", comments.get(instruction));
 
-//        Noop();
-//        System.out.println("Translate branch:" + I);
+        AddNop();
+        //        System.out.println("Translate branch:" + I);
+    }
+
+    protected void AddNop() throws Exception {
+        Add(Mips.Instruction("nop").copy());
     }
 
     @Override
@@ -384,7 +370,7 @@ public class Gen extends API.TargetGen {
 
         // Aloca o espaco da pilha
         Instruction alloc = Copy(Registers.R_SP, Registers.R_SP, "-" + data.Size())
-                .S("comment", "p| push stack frame");
+                .S("comment", "prolog| push stack frame");
 
         if (!getTarget().Block().getName().equals("main")) {
             // Restaura o fp
@@ -403,7 +389,7 @@ public class Gen extends API.TargetGen {
                     newvars -= WORD_INC;
 
                     StoreWord(reg, Registers.R_SP, data.Offset(reg))
-                            .S("comment", "p| backup " + reg);
+                            .S("comment", "prolog| backup " + reg);
                 }
 
                 alloc.somar("offset", newvars);
@@ -413,7 +399,7 @@ public class Gen extends API.TargetGen {
 //        System.out.println("Activation Registry:()\n" + data);
         if (alloc.getInt("offset", 0) != 0) {
             // Copia o sp para o fp
-            CopyReg(Registers.R_SP, Registers.R_FP).Prepend("comment", "p|");
+            CopyReg(Registers.R_SP, Registers.R_FP).Prepend("comment", "prolog|");
             ResetReturnArgs();
         } else {
             getTarget().Block().Remove(alloc);
@@ -435,23 +421,23 @@ public class Gen extends API.TargetGen {
             boolean call = getIR().Block().HasCall();
             for (String reg : new String[]{Registers.R_FP, Registers.R_RA}) {
                 if (call) {
-                    LoadWord(reg, Registers.R_SP, data.Offset(reg)).S("comment", "e| restore " + reg);
+                    LoadWord(reg, Registers.R_SP, data.Offset(reg)).S("comment", "epilog| restore " + reg);
                 }
             }
 
             // Desaloca a pilha
             Copy(Registers.R_SP, Registers.R_SP, data.Size())
-                    .S("comment", "e|pop stack frame");
+                    .S("comment", "epilog|pop stack frame");
             CopyReg(Registers.R_SP, Registers.R_FP)
-                    .S("comment", "e|pop stack frame");
+                    .S("comment", "epilog|pop stack frame");
 
 //        if (getIR().Block().HasCall()) {
             Add(new Instruction("jr")
                     .S("rs", Registers.R_RA)
-                    .S("comment", "e|return"));
+                    .S("comment", "epilog|return"));
 //        }[] 
         } else {
-            Add(new Instruction("stop").S("txt", "11111111111111111111111111111111").S("comment", "end of programa"));
+            Add(Mips.Instruction("stop").copy());
         }
     }
 
@@ -517,6 +503,30 @@ public class Gen extends API.TargetGen {
 
     }
 
+    @Override
+    public void TranslateLoad(Instruction inst) throws Exception {
+        String addr = inst.G("p1");
+
+//        System.out.println("Load " + addr + " on block ");
+        LoadWord(
+                inst.G("reg.p1"),
+                FrameRegister(addr),
+                getTarget().Block().Data().Offset(addr)
+        );
+    }
+
+    @Override
+    public void TranslateStore(Instruction inst) throws Exception {
+        String addr = inst.G("p1");
+
+//        System.out.println("Store " + addr + " on block ");
+        StoreWord(
+                inst.G("reg.p1"),
+                FrameRegister(addr),
+                getTarget().Block().Data().Offset(addr)
+        );
+    }
+
     /**
      * Traducao de intrucoeS do tipo
      *
@@ -538,7 +548,7 @@ public class Gen extends API.TargetGen {
 
             case "&": // Lendo o endereco de um ponteiro
                 Copy(regp1,
-                        GlobalOrFrameRegister(p1),
+                        FrameRegister(p1),
                         getIR().Block().Data().Offset(p1)
                 )
                         .S("tac.position", inst.G("block.position"))
@@ -546,10 +556,10 @@ public class Gen extends API.TargetGen {
 
                 System.out.println("PointerAssi&:" + inst);
                 // Se nao fez o store
-                if (StoreResult(inst, regp1, dst) == null) {
-                    CopyReg(regp1, regdst);
+//                if (StoreResult(inst, regp1, dst) == null) {
+//                    CopyReg(regp1, regdst);
 //                            .S("comment", "store content of " + regdst + " in " + dst);
-                }
+//                }
                 break;
             case "*": // Lendo o conteudo de um ponteiro
                 /**
@@ -560,7 +570,7 @@ public class Gen extends API.TargetGen {
                  * lw ${dst},0(${p1}) $s<br>
                  */
                 LoadWord(regp1,
-                        GlobalOrFrameRegister(p1),
+                        FrameRegister(p1),
                         getIR().Block().Data().Offset(p1))
                         .S("tac.position", inst.G("block.position"))
                         .S("comment", "load address stored in " + p1);
@@ -570,12 +580,12 @@ public class Gen extends API.TargetGen {
                         "0")
                         .S("tac.position", inst.G("block.position"))
                         .S("comment", "load content of address stored in " + regp1);
-                /*Se for a ultima operacao de escrita nessa variavel salva em memoria*/
-                Instruction store = StoreResult(inst, regdst, dst);
-                if (store != null) {
-                    store.S("comment", "store content of " + regdst + " in " + dst);
-                }
 
+                /*Se for a ultima operacao de escrita nessa variavel salva em memoria*/
+//                Instruction store = StoreResult(inst, regdst, dst);
+//                if (store != null) {
+//                    store.S("comment", "store content of " + regdst + " in " + dst);
+//                }
                 break;
             default: // Atribuicao a um ponteiro
                 LoadParam(inst);
@@ -587,7 +597,7 @@ public class Gen extends API.TargetGen {
                  * conteudo da variavel referenciada
                  */
                 LoadWord(regdst,
-                        GlobalOrFrameRegister(dst),
+                        FrameRegister(dst),
                         getIR().Block().Data().Offset(dst))
                         .S("tac.position", inst.G("block.position"))
                         .S("comment", "load address stored in " + dst);
@@ -599,54 +609,6 @@ public class Gen extends API.TargetGen {
 
     }
 
-    @Override
-    public IvannosysTargetArch Export() {
-        Code Target = getTarget();
-        System.out.println(Target.GData());
-        String out = "", tmp;
-
-        Integer index;
-
-        for (Map.Entry<String, Block> x : Target.stmts.entrySet()) {
-            System.out.println(x.getValue().Data());
-            index = 0;
-            for (Instruction instr : x.getValue().Instructions()) {
-//                System.out.println("Export:" + instr);
-                tmp = instr.G("inst.dec");
-                if (tmp.equals("")) {
-                    continue;
-                }
-                out = out
-                        //                        .concat(Integer.toHexString(index))
-                        //                        .concat(":")
-                        //                        .concat(String.format("%X\n", tmp.trim()) + "\n");
-                        .concat(tmp + "\n");
-                index++;
-            }
-        }
-
-//        System.out.println("Export:" + out);
-        // Grava resutlado no arquivo de memoria do simulador
-        Utils.WriteFile("\\src\\tools\\mips\\memory\\mi.memory", out);
-        try {
-            new tools.mips.MipsProcessor(new tools.mips.MipsSettings() {
-                {
-                    debugmode = true;
-//                    stepByStep = true;
-                    SetInstructionMemoryFile("\\src\\tools\\mips\\memory\\mi.memory");
-                    SetDataMemoryFile("\\src\\tools\\mips\\memory\\md.memory");
-                }
-            })
-                    .SetBreak("6c")
-                    .Run()
-                    .Persist();
-        } catch (Exception ex) {
-            Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
-        }
-
-        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-    }
-
 //    public void CopyData(LinkedHashMap<String, Node> dst, LinkedHashMap<String, Node> src) throws Exception {
     public void CopyData(DataFrame dst, DataFrame src) throws Exception {
         Node value;
@@ -701,7 +663,6 @@ public class Gen extends API.TargetGen {
             LoadParam(inst, "p1");
             c = CopyReg(inst.G("reg.p1"), rt);
         }
-//        System.out.println("COPY::" + c);
         return c.S("tac.position", inst.G("block.position"));
     }
 
@@ -712,7 +673,7 @@ public class Gen extends API.TargetGen {
                 int offset = getTarget().Block().Data().Offset(inst.G("p1"));
                 String p1 = inst.G("p1"),
                         rt = inst.G("reg.p1"),
-                        rs = GlobalOrFrameRegister(p1);
+                        rs = FrameRegister(p1);
 //            System.out.println("Indexed read:" + inst);
                 if (!inst.isNumber("p1.indice")) {
                     String rd = inst.G("reg.p1.indice");
@@ -727,6 +688,9 @@ public class Gen extends API.TargetGen {
                     rs = rd;
                 }   // Carrega o conteudo enderecado em rt para rt
                 LoadWord(rt, rs, offset).S("tac.position", inst.G("block.position"));
+
+                AddNop();
+
             } catch (Exception ex) {
                 Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
             }
@@ -757,7 +721,7 @@ public class Gen extends API.TargetGen {
                 // deve ser armazenado
 
                 String dst = inst.G("dst"),
-                        rs = GlobalOrFrameRegister(dst),
+                        rs = FrameRegister(dst),
                         comment;
                 int offset = getTarget().Block().Data().Offset(dst);
                 if (dstIndexed) {
@@ -783,6 +747,11 @@ public class Gen extends API.TargetGen {
                 StoreWord(regp1, rs, offset)
                         .S("tac.position", inst.G("block.position"))
                         .S("comment", comment);
+
+                Instruction n = Next();
+                if (n != null && (n.eq("rs", regp1) || n.eq("rts", regp1))) {
+                    AddNop();
+                }
             } catch (Exception ex) {
                 Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
             }
@@ -832,7 +801,7 @@ public class Gen extends API.TargetGen {
                 try {
                     Ninst.S("inst", "lw") // R[$rt] ← Mem4B(R[$rs] + SignExt16b(imm))
                             .S("rt", inst.G("reg." + param))
-                            .S("rs", GlobalOrFrameRegister(pname))
+                            .S("rs", FrameRegister(pname))
                             .S("comment", "load address stored in " + pname)
                             .set("offset", getTarget().Block().Data().Offset(pname));
                 } catch (Exception ex) {
@@ -875,37 +844,43 @@ public class Gen extends API.TargetGen {
         );
     }
 
-    protected Instruction StoreWord(String rt, String rs, int offset) {
+    protected Instruction StoreWord(String rt, String rs, int offset) throws Exception {
         return StoreWord(rt, rs, "" + offset);
     }
 
-    protected Instruction StoreWord(String rt, String rs, String offset) {
-        return Add(new Instruction("sw")
+    protected Instruction StoreWord(String rt, String rs, String offset) throws Exception {
+        Instruction n = Next();
+
+        Instruction sw = Add(new Instruction("sw")
                 .S("rt", rt)
                 .S("rs", rs)
                 .S("offset", offset));
+
+        // System.out.println("N:" + n);
+        // Se a proxima instrução depende do valor armazenado
+        if (n != null && (n.eq("reg.p1", rt) || n.eq("reg.p2", rt))) {
+            AddNop();
+        }
+        return sw;
     }
 
-    protected Instruction LoadWord(String rt, String rs, int offset) {
+    protected Instruction LoadWord(String rt, String rs, int offset) throws Exception {
         return LoadWord(rt, rs, "" + offset);
     }
 
-    protected Instruction LoadWord(String rt, String rs, String offset) {
-        return Add(new Instruction("lw") // lw $rt, imm($rs)
+    protected Instruction LoadWord(String rt, String rs, String offset) throws Exception {
+        Instruction n = Next();
+
+        Instruction lw = Add(new Instruction("lw") // lw $rt, imm($rs)
                 .S("rt", rt)
                 .S("rs", rs)
                 .S("offset", offset));
-    }
 
-    protected Instruction Noop() {
-        return new Instruction("sll")
-                .S("rs", "zero")
-                .S("rt", "zero")
-                .S("rd", "zero");
-    }
-
-    protected Instruction AddNoop() {
-        return Add(Noop());
+        // Se a proxima instrução depende do valor armazenado
+        if (n != null && (n.eq("reg.p1", rt) || n.eq("reg.p2", rt))) {
+            AddNop();
+        }
+        return lw;
     }
 
     @Override
@@ -922,28 +897,14 @@ public class Gen extends API.TargetGen {
                     .getName()).log(Level.SEVERE, null, ex);
         }
 
+//        System.out.println("Add:" + inst);
         return super.Add(inst); //To change body of generated methods, choose Tools | Templates.
     }
 
-    protected String GlobalOrFrameRegister(String var) {
-//        System.out.println("GlobalOrFrameRegister:" + var);
+    protected String FrameRegister(String var) {
         return var.contains("_G") ? Registers.R_GP : Registers.R_FP;
     }
 
-    protected Instruction StoreResult(Instruction inst, String rd, String dst) {
-        if (inst.eq("reg.dst.store", "true")) {
-            try {
-                return StoreWord(rd,
-                        GlobalOrFrameRegister(dst),
-                        getTarget().Block().Data().Offset(dst)
-                ).S("tac.position", inst.G("block.position"));
-            } catch (Exception ex) {
-                Logger.getLogger(Gen.class.getName()).log(Level.SEVERE, null, ex);
-            }
-        }
-        return null;
-    }
-
     private void ResetReturnArgs() {
         returnRegisters = new ArrayList<String>() {
             {
@@ -957,85 +918,4 @@ public class Gen extends API.TargetGen {
         };
     }
 
-    @Override
-    public void TranslateLoad(Instruction inst) throws Exception {
-//        System.out.println("TranslateLoad:" + inst);
-
-        String addr = inst.G("p1");
-
-//        System.out.println("Load " + addr + " on block ");
-        LoadWord(
-                inst.G("reg.p1"),
-                GlobalOrFrameRegister(addr),
-                getTarget().Block().Data().Offset(addr)
-        );
-    }
-
-    @Override
-    public void TranslateStore(Instruction inst) throws Exception {
-        String addr = inst.G("p1");
-
-//        System.out.println("Store " + addr + " on block ");
-        StoreWord(
-                inst.G("reg.p1"),
-                GlobalOrFrameRegister(addr),
-                getTarget().Block().Data().Offset(addr)
-        );
-    }
-
 }
-//  00000000 <main>:
-// 0:  0666763252	addiu sp,sp,-12	--p| push stack frame
-// 4:  0001962017	addu fp,zero,sp	--p|copy fp ← sp
-// 8:  0605028352	addiu s0,zero,0	.0.--copy _V1 ← 0
-// c:  2949644288	sw s0,fp,0	
-//10:  0605093890	addiu s1,zero,2	.2.--copy _V2 ← 2
-//14:  2949709828	sw s1,fp,4	
-//18:  0605159424	addiu s2,zero,0	.4.--copy _V3 ← 0
-//1c:  2949775368	sw s2,fp,8	
-//20:  0134217750	j 58 <main+0x58>	.6.
-//24:  2412969988	lw s3,fp,4	
-//28:  0001253409	addu a0,zero,s3	.8.--push param
-//2c:  0201326621	jal 74 <bitCount+0x0>	.9.--jump to <bitCount>
-//30:  0000153633	addu t3,zero,v0	--copy t3 ← v0
-//34:  2413035520	lw s4,fp,0	
-//38:  0042704929	addu s4,s4,t3	.12.
-//3c:  2949906432	sw s4,fp,0	
-//40:  2413101060	lw s5,fp,4	
-//44:  0649396225	addiu s5,s5,1	.15.
-//48:  2949971972	sw s5,fp,4	
-//4c:  2413166600	lw s6,fp,8	
-//50:  0651558913	addiu s6,s6,1	.18.
-//54:  2950037512	sw s6,fp,8	
-//58:  2413232136	lw s7,fp,8	
-//5c:  0604897282	addiu t6,zero,2	.21.
-//60:  0049156131	subu v0,s7,t6	.21.
-//64:  0071368687	bltz v0,24 <main+0x24>	.21.--branch if register < 0
-//68:  2412773376	lw s0,fp,0	
-//6c:  0001052705	addu v0,zero,s0	.23.--push return
-//70:  4294967295	stop 	--end of programa
-//  00000074 <bitCount>:
-//74:  0666763256	addiu sp,sp,-8	--p| push stack frame
-//78:  0001962017	addu fp,zero,sp	--p|copy fp ← sp
-//7c:  2948857856	sw a0,fp,0	.0.--pop param
-//80:  0605093888	addiu s1,zero,0	.1.--copy _V5 ← 0
-//84:  2949709828	sw s1,fp,4	
-//88:  2412773376	lw s0,fp,0	
-//8c:  0033558563	subu v0,s0,zero	.4.
-//90:  0406847500	blez v0,c4 <bitCount+0x50>	.4.--branch if register <= 0
-//94:  2412904452	lw s2,fp,4	
-//98:  0642908161	addiu s2,s2,1	.6.
-//9c:  2949775364	sw s2,fp,4	
-//a0:  2412969984	lw s3,fp,0	
-//a4:  0604700673	addiu t3,zero,1	.9.
-//a8:  0040591395	subu t4,s3,t3	.9.
-//ac:  2412969984	lw s3,fp,0	
-//b0:  0040671268	and s3,s3,t4	.11.
-//b4:  2949840896	sw s3,fp,0	
-//b8:  2412969984	lw s3,fp,0	
-//bc:  0308281345	beq zero,s3,c4 <bitCount+0x50>	.14.--branch if equals
-//c0:  0134217765	j 94 <bitCount+0x20>	.15.
-//c4:  2413035524	lw s4,fp,4	
-//c8:  0001314849	addu v0,zero,s4	.42.--push return
-//cc:  0666697736	addiu sp,sp,8	--e|pop stack frame
-//d0:  0065011720	jr ra	--e|return

+ 9 - 1
src/targets/mips/Mips.java

@@ -32,6 +32,7 @@ public class Mips {
             put("-", new Instruction()
                     //        .S("std", "sub")
                     //        .S("uns", "subu")
+                    .S("ime", "addiu")
                     .S("std", "subu")
             );
 
@@ -161,12 +162,19 @@ public class Mips {
     };
     public static LinkedHashMap<String, Instruction> Codops = new LinkedHashMap<String, Instruction>() {
         {
+            put("nop", new Instruction("sll")
+                    .S("rs", "zero")
+                    .S("rt", "zero")
+                    .S("rd", "zero")
+                    .S("comment", "Nop"));
+            
             put("stop", new Instruction()
                     .S("type", "S")
                     .S("inst", "stop")
                     .S("codop", "111111")
                     .S("txt", "11111111111111111111111111111111")
-                    .S("format", "S"));
+                    .S("format", "S")
+                    .S("comment", "End of programa"));
 
             put("add", new Instruction()
                     .S("type", "R")

+ 5 - 5
src/targets/mips/AllocatorMipsProcessor.java

@@ -7,7 +7,7 @@ package targets.mips;
 
 import API.Api;
 import API.CodeProcessorInterface;
-import Processors.BaseBlockProcessor;
+import Processors.BasicBlockProcessor;
 import Processors.BlockBaseGroup;
 import Processors.BlockBaseOcorrences;
 import Processors.Interval;
@@ -21,16 +21,16 @@ import java.util.LinkedList;
  *
  * @author EUGENIO CARVALHO
  */
-public class AllocatorMipsProcessor implements AllocatorInterface, CodeProcessorInterface {
+public class MipsAllocatorProcessor implements AllocatorInterface, CodeProcessorInterface {
 
     protected int instructionPosition;
     protected Code tac;
     protected Registers registers;
     protected BlockBaseGroup group;
     protected LinkedList<String> free = new LinkedList<>();
-    protected BaseBlockProcessor blockProcessor;
+    protected BasicBlockProcessor blockProcessor;
 
-    public AllocatorMipsProcessor() {
+    public MipsAllocatorProcessor() {
 
     }
 
@@ -44,7 +44,7 @@ public class AllocatorMipsProcessor implements AllocatorInterface, CodeProcessor
 
         BlockBaseOcorrences bb;
         registers = new Registers();
-        blockProcessor = (BaseBlockProcessor) cp.get("ir.basic.blocks");
+        blockProcessor = (BasicBlockProcessor) cp.get("ir.basic.blocks");
 
         instructionPosition = 0;
         group = blockProcessor.getBasicBlockGroup(IR.Block().getName());

+ 2 - 2
src/targets/mips/CopyDepsProcessor.java

@@ -14,11 +14,11 @@ import java.util.LinkedHashMap;
  *
  * @author EUGENIO CARVALHO
  */
-public class CopyDepsProcessor implements CodeProcessorInterface {
+public class MipsCopyDepsProcessor implements CodeProcessorInterface {
 
     protected Code tac;
 
-    public CopyDepsProcessor() {
+    public MipsCopyDepsProcessor() {
     }
 
     @Override

+ 3 - 3
src/targets/mips/LoadStoreProcessor.java

@@ -5,7 +5,7 @@
  */
 package targets.mips;
 
-import Processors.BaseBlockProcessor;
+import Processors.BasicBlockProcessor;
 import API.CodeProcessorInterface;
 import common.Code;
 import java.util.LinkedHashMap;
@@ -14,9 +14,9 @@ import java.util.LinkedHashMap;
  *
  * @author EUGENIO CARVALHO
  */
-class LoadStoreProcessor implements CodeProcessorInterface {
+class MipsLoadStoreProcessor implements CodeProcessorInterface {
 
-    public LoadStoreProcessor(BaseBlockProcessor ocorrences) {
+    public MipsLoadStoreProcessor(BasicBlockProcessor ocorrences) {
     }
 
     @Override

+ 4 - 4
src/targets/mips/OTMinActivationRegister.java

@@ -9,18 +9,18 @@ import common.Block;
 import common.Code;
 import API.CodeProcessorInterface;
 import common.DataFrame;
-import Processors.BaseBlockProcessor;
+import Processors.BasicBlockProcessor;
 import java.util.LinkedHashMap;
 
 /**
  *
  * @author EUGENIO CARVALHO
  */
-public class OTMinActivationRegister implements CodeProcessorInterface {
+public class MipsOTMinActivationRegister implements CodeProcessorInterface {
 
-    protected BaseBlockProcessor ocorrences;
+    protected BasicBlockProcessor ocorrences;
 
-    OTMinActivationRegister(BaseBlockProcessor ocorrences) {
+    MipsOTMinActivationRegister(BasicBlockProcessor ocorrences) {
         this.ocorrences = ocorrences;
     }
 

+ 66 - 0
src/targets/mips/MipsOtimizationProcessor.java

@@ -0,0 +1,66 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package targets.mips;
+
+import API.CodeProcessorInterface;
+import common.Code;
+import common.Instruction;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.ListIterator;
+
+/**
+ *
+ * @author EUGENIO CARVALHO
+ */
+public class MipsOtimizationProcessor implements CodeProcessorInterface {
+
+    public MipsOtimizationProcessor() {
+    }
+
+    @Override
+    public void Exec(Code c, LinkedHashMap<String, CodeProcessorInterface> cp) throws Exception {
+        Instruction last = new Instruction();
+//        ArrayList<Instruction> remove = new ArrayList<>();
+        ListIterator<Instruction> instructions = c.Block().Instructions().listIterator();
+
+        for (Iterator<Instruction> it = instructions; it.hasNext();) {
+            Instruction current = it.next();
+            switch (current.G("inst")) {
+                // Realiza a copia direta quando a instrucao anterior for um load e a atual for a copia
+                case "addu":
+                    if (current.eq("rs", "zero") && last.eq("inst", "lw")) {
+                        last.S("rt", current.G("rd"));
+//                        remove.add(current);
+                        it.remove();
+                    }
+                    break;
+            }
+
+            last = current;
+        }
+//        for (Instruction current : ) {
+//
+//            switch (current.G("inst")) {
+//                // Realiza a copia direta quando a instrucao anterior for um load e a atual for a copia
+//                case "addu":
+//                    if (current.eq("rs", "zero") && last.eq("inst", "lw")) {
+//                        last.S("rt", current.G("rd"));
+//                        remove.add(current);
+//                    }
+//                    break;
+//            }
+//
+//            last = current;
+//        }
+
+//        for (Instruction instruction : remove) {
+//            System.out.println("Remover MipsOtimizationProcessor:" + instruction);
+//            instructions.remove(instruction);
+//        }
+    }
+
+}

+ 0 - 25
src/targets/mips/OtimizationMips.java

@@ -1,25 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-package targets.mips;
-
-import API.CodeProcessorInterface;
-import common.Code;
-import java.util.LinkedHashMap;
-
-/**
- *
- * @author EUGENIO CARVALHO
- */
-public class OtimizationMips implements CodeProcessorInterface {
-
-    public OtimizationMips() {
-    }
-
-    @Override
-    public void Exec(Code c, LinkedHashMap<String, CodeProcessorInterface> cp) throws Exception {
-    }
-
-}

+ 33 - 7
src/tools/mips/MipsProcessor.java

@@ -21,6 +21,7 @@ import targets.mips.Mips;
  */
 public class MipsProcessor {
 
+    public String ID = "default";
     public MipsSettings settings;
     public Memory MD;
     public Memory MI;
@@ -31,11 +32,21 @@ public class MipsProcessor {
     public HashMap<String, Boolean> breakPoint = new HashMap<>();
 
     public MipsProcessor(MipsSettings settings) throws Exception {
-        this.settings = settings;
-        int size = (16 * 1024); //16KB
-        MI = new Memory(settings.Get("mi"), size, false);
-        MD = new Memory(settings.Get("md"), size, true);
-//        System.out.println("MD:" + MD);
+
+        this.settings = new MipsSettings();
+        this.settings.S("debugmode", "true").S("stepByStep", "false");
+
+        MI = new Memory(
+                settings.G("memory.instruction"),
+                settings.getInt("memory.instruction.size"),
+                false
+        );
+        MD = new Memory(
+                settings.G("memory.data"),
+                settings.getInt("memory.data.size"),
+                true
+        );
+
         // Limpa todos os dados armazenados 
 //        MD.Reset();
 //        System.out.println("Init Md:" + MD.R(0L));
@@ -43,6 +54,18 @@ public class MipsProcessor {
 
         InitInstructions();
 
+        this.settings.copy(
+                "debugmode,"
+                + "mode,"
+                + "stepByStep,"
+                + "breakpoints,"
+                + "memory.instruction,"
+                + "memory.instruction.size,"
+                + "memory.data,"
+                + "memory.data.size",
+                settings);
+
+        SetBreak(this.settings.G("breakpoints"));
 //        SetBreak("44,48,58,5c");
 //        InitInstructions2();
     }
@@ -63,7 +86,7 @@ public class MipsProcessor {
     }
 
     protected void Log(String msg) {
-        if (!settings.debugmode) {
+        if (!settings.eq("mode", "debug")) {
             return;
         }
 
@@ -78,6 +101,8 @@ public class MipsProcessor {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         // Fetch
 //        System.out.println("MI:" + MI);
+        System.out.println("Start simulation ... " + ID);
+        System.out.println();
 
         try {
             Instruction instruction;
@@ -103,7 +128,8 @@ public class MipsProcessor {
                 Log("Registradores(\n" + RBank
                         + ")\b nextPC:" + Integer.toHexString((int) PC));
 
-                if (settings.stepByStep || breakPoint.containsKey(cAddress)) {
+                if (settings.eq("stepByStep", "true")
+                        || breakPoint.containsKey(cAddress)) {
                     br.readLine();
                 }
                 // Decode

+ 3 - 37
src/tools/mips/MipsSettings.java

@@ -5,46 +5,12 @@
  */
 package tools.mips;
 
-import java.util.HashMap;
+import common.Instruction;
 
 /**
  *
  * @author EUGENIO CARVALHO
  */
-public class MipsSettings {
-
-    public boolean stepByStep = false;
-    public boolean debugmode = true;
-
-    protected HashMap<String, String> data = new HashMap<String, String>();
-
-    public MipsSettings() {
-    }
-
-    public MipsSettings SetInstructionMemoryFile(String filename) {
-        data.put("mi", filename);
-        return this;
-    }
-
-    public MipsSettings SetDataMemoryFile(String filename) {
-        data.put("md", filename);
-        return this;
-    }
-
-    public MipsSettings Set(String prop, String value) {
-        data.put(prop, value);
-        return this;
-    }
-
-    public String Get(String prop) {
-        return Get(prop, "");
-    }
-
-    public String Get(String prop, String value) {
-
-        if (data.containsKey(prop)) {
-            return data.get(prop);
-        }
-        return value;
-    }
+public class MipsSettings extends Instruction {
+    
 }

+ 16 - 16
src/tools/mips/memory/md.memory

@@ -1,15 +1,15 @@
-0000:	0
-0004:	0
-0008:	0
-0012:	0
-0016:	0
-0020:	0
-0024:	0
-0028:	0
-0032:	0
-0036:	0
-0040:	0
-0044:	0
+0000:	1
+0004:	2
+0008:	3
+0012:	4
+0016:	1
+0020:	2
+0024:	3
+0028:	4
+0032:	7
+0036:	10
+0040:	15
+0044:	22
 0048:	0
 0052:	0
 0056:	0
@@ -4090,7 +4090,7 @@
 16356:	0
 16360:	0
 16364:	0
-16368:	7
-16372:	0
-16376:	10033
-16380:	10033
+16368:	0
+16372:	2
+16376:	2
+16380:	2

+ 154 - 41
src/tools/mips/memory/mi.memory

@@ -1,54 +1,167 @@
+0201326597
+0000000000
+0201326663
+0000000000
+4294967295
 0666763252
 0001962017
-0605028352
+0605028353
 2949644288
-0605103921
+0605093888
 2949709828
+0134217790
+0000000000
 0605159424
 2949775368
-0134217750
+0134217780
+0000000000
 2412969988
-0001253409
-0201326621
-0000153633
-2413035520
-0042704929
-2949906432
-2413101060
-0649396226
-2949971972
-2413166600
-0651558913
-2950037512
-2413232136
-0604897290
-0049156131
-0071368687
-2412773376
-0001052705
-4294967295
-0666763256
+0000000000
+0001267745
+0000745536
+2413035528
+0000000000
+0001337377
+0026042401
+0000815232
+2413101056
+0000000000
+0059666465
+2916417536
+2412969988
+0000000000
+0001275937
+0001032256
+2413035528
+0000000000
+0001327137
+0050905121
+0001591424
+2413101056
+0000000000
+0059328545
+2905931792
+0000000000
+2413101056
+0000000000
+0649396225
+2949971968
+2413035528
+0000000000
+0647233537
+2949906440
+2412773384
+0000000000
+0604831746
+0034410531
+0071368664
+0000000000
+2412838916
+0000000000
+0640745473
+2949709828
+2412904452
+0000000000
+0604897282
+0038670371
+0071368650
+0000000000
+0666697740
+0001962017
+0065011720
+0666763248
 0001962017
-2948857856
+0605028352
+2949644288
 0605093888
 2949709828
-2412773376
-0033558563
-0406847500
-2412904452
-0642908161
-2949775364
-2412969984
-0604700673
-0040591395
-2412969984
-0040671268
-2949840896
-2412969984
-0308281345
-0134217765
+0134217886
+0000000000
+0605159424
+2949775368
+0134217876
+0000000000
+0605224960
+2949840908
+0134217851
+0000000000
 2413035524
-0001314849
-0666697736
+0000000000
+0001335329
+0000813120
+2413101068
+0000000000
+0001404961
+0028207137
+0000882816
+0059734049
+2381709312
+0000000000
+0001490977
+2413101068
+0000000000
+0001392673
+0000542784
+2413232136
+0000000000
+0001527841
+0019548193
+0000612480
+0059463713
+2372927504
+0000000000
+0001073185
+0051146776
+0000028690
+2412838912
+0000000000
+0036603937
+2949709824
+2413101068
+0000000000
+0649396225
+2949971980
+2412904460
+0000000000
+0604962818
+0038735907
+0071368663
+0000000000
+2412969988
+0000000000
+0001261601
+0000544832
+2413035528
+0000000000
+0001329185
+0021581857
+0000678016
+2413166592
+0000000000
+0059463713
+2910191648
+0605421568
+2950037504
+2413035528
+0000000000
+0647233537
+2949906440
+2412773384
+0000000000
+0604897282
+0034476067
+0071368634
+0000000000
+2412838916
+0000000000
+0640745473
+2949709828
+2413101060
+0000000000
+0604962818
+0045027363
+0071368620
+0000000000
+0666697744
 0001962017
 0065011720